Security :: Keep Getting Redirected To Login Page?

Jan 29, 2010

I have a test site that is a mirror image of production site.

Today I discovered that after logging in to test site when I try to submit anything from any page I get redirected back to the login page.

The production site is working fine, both sites hosted on windows 2003 servers with IIS and front page extensions 2002 plus asp.net 2.

View 5 Replies


Similar Messages:

Security :: When Use Clicks On Logout Button The Current Session Is Closed And User Is Redirected To A Login.aspx Page?

May 4, 2010

I have written custom code for login and logout...When use clicks on logout button the current session is closed and user is redirected to a login.aspx page...The problem is that when a user click a back button on internet explorer it the previous page he was navigating is shown to him...(altough he cant perform any operation as session is null and their is condition in page load that if session is null user should be redirected to login page)May i have to clear cache of client ??

View 3 Replies

Security :: Secured Site Using The Login Control / Do Not Want Them Redirected Based On Their Login Status?

Mar 24, 2011

I am doing a simple secured site using the login control. I would like users to be redirected to their dashboard page once they log in, but after that if they choose to browse I do NOT want them redirected based on their login status. I am using the generic template provided in VWD with the basic login setup in the template including the tabbed ASP menu control - nothing fancy, nothing custom. This is intended to be something very simple and quick. Here is the code I am using for the page load...

[Code]....

So if I do this code WITHOUT the "IsPostBack", logged in users are always redirected to their dashboard and cannot see the hompage. However with that IsPostBack test, the redirect after initial login doesn't work.

I know this is extremely basic and simple, but I am restarting with this stuff after a year away, and I need a nudge.

View 4 Replies

MVC :: Login Page In App Hosted On IIS 7 Integrated Mode - Its Never Getting Redirected To The Home Screen Or Invalid Login Screen

May 19, 2010

I have created my first MVC application. I am using forms authenticataion. I have created a custom action filter MyAppAuthorizationFilter which inherits from AuthorizeFilter. Inside this filter I'm authenticating the user credentials by checking them against a database table (by overriding OnAuthorize method). If the user is not authenticated, I am redirecting the users to a login page (which is view of LoginController). I am using this filter agaginst my main controller so that all actions in this filter will execute only if the user is authenticated.

I do not have any problem when I use the asp.net development server (shipped with Visual Studio). But when I deploy the app to our IIS7 server, I can see the login screen when I access the default url, but after entering the credentials (both correct and incorrect) and posting back the Login page, it stays on the Login page (clears the pwd, but not the username). Its never getting redirected to the home screen or invalid login screen.

IIS 7 server has .net framework 3.5SP1, but no MVC. So I deployed the System.Web.Mvc dll in the bin folder.

Here's my Code (I've omitted the views and models as they are not needed here):

[MyAppAuthorizationFilter]
public class MainController : Controller
{
//
// GET: / [code]......

View 2 Replies

Login Page Cannot Load An Image Because The Request Is Redirected?

Nov 30, 2010

I had a website project which worked fine. I have converted it into a web application project in VS 2010. Now when I start the project from VS my login page is never loaded because when it tries to load images, scripts, css all the requests are redirected back to login page.

However if I setup a website under my local IIS to use the folder where the project is the website works no problem.

I have created a test web app to play with. And it does pretty much the same. Login page cannot load an image because the request is redirected. Here is what I've got.

web.config

<configuration>
<system.web>
<compilation debug="true" targetFramework="4.0" />
<authentication mode="Forms">
<forms name=".ASPXAUTH" loginUrl="~/login1.aspx" defaultUrl="~/default.aspx" slidingExpiration="true"/>
</authentication>
<authorization>
<deny users="?"/>
</authorization>
<trace enabled="true" pageOutput="true" requestLimit="150" mostRecent="false" />
</system.web>
<location path="trace.axd">
<system.web>
<authorization>
<allow users="*"/>
</authorization>
</system.web>
</location>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"/>
</system.webServer>
</configuration>
login1.aspx
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="login1.aspx.cs" Inherits="TestWebApp.login1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<img src="bcb.jpeg" />
login page
</div>
</form>
</body>
</html>
default.aspx
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="default.aspx.cs" Inherits="TestWebApp._default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
default page
</div>
</form>
</body>
</html>

and the trace looks like

Requests to this Application Remaining: 140
No. Time of Request File Status Code Verb
1 11/30/2010 10:57:20 AM default.aspx 302 GET View Details
2 11/30/2010 10:57:20 AM login1.aspx 200 GET View Details
3 11/30/2010 10:57:22 AM bcb.jpeg 302 GET View Details
4 11/30/2010 10:57:22 AM login1.aspx 200 GET View Details

View 1 Replies

Website Occasionally Being Redirected To Login Page Even Though Session Not Expired

Oct 27, 2011

What might cause this? Seems to be happening at random on a site I created. A user will for example be filing in a form, and when they click Save, it will flash to the login page as if the session has expired, but it will still show them logged in, and if they click back and save again it will work. It's not confined to the one page either, it just seemingly at random acts like the session has expired when it hasn't.

View 7 Replies

Security :: Keeps Redirected To 401 Unauthorized Page?

Aug 26, 2010

I keep redirected to a "401 Unauthorized" page, which is the Login page. It first loads a 302 Found (Failed to load source for: http://localhost:4558) page then

the redirection.

<!--<authentication mode="Forms">
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<forms loginUrl="~/Login" timeout="2880"/>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;</authentication>-->

Everything works well when I comment the attribute Authentication at web.config or if after I logged-in.

Before this happens, I delete all files at (C:WINDOWSMicrosoft.NETFrameworkv2.0.50727Temporary ASP.NET Files). Don't you think this is the reason?

I'm under MVC, even if I remove the action filter Authorize(), I still get redirected to 401.

</httpModules>
<identity impersonate="true" />
</system.web>

I use VWD 2008 SP1 and MSSQL2005.

View 6 Replies

Security :: Access Level / Ensure That A User From A Particular Group Is Redirected To His/her Summary Page?

Apr 1, 2010

I have a summary page that has an Add New Record button, andEdit Record butto and a Delete Record button.Every user has ReadOnly access.However, only users with administrators Access Level can add, edit, delete, view.Users with Staffers Access Level can only Add records but cannot delete or edit.So, basically, 2 access Levels, Administrators, Staffers.Administrators can view, add, delete, update records.The rest, Staffers, can only view and Add records.I am struggling to figure this out.I have done this a ton of times using Classic ASP, something like:

If AccessLevel <> "Administrator" Then
Response.Redirect"login.asp" 'so if user has admin password, s/he ccan log in with that.
End if

[code]...

4 different groups will be using the system, each will be redirected to their own summary page based on their groupNumber.All I just want now is to ensure that a user from a particular group is redirected to his/her summary page, then that user is checked again against AccessLevel (view, edit, delete, update).

View 7 Replies

Using Windows Auth, But Getting Redirected To Forms Auth Login Page?

Feb 21, 2011

We're running IIS7 and have windows authentication enabled. Everything else is disabled. When we go to the page though, we aren't prompted for a windows logon, but are redirected to the default forms authentication login page (Accoun

View 1 Replies

Reverse Authorized Pages Being Redirected To Login?

Feb 1, 2010

I have a page that I want only anonymous users to see, and authenticated users to be redirected. So, like this:

<location path="Login_ForgotUserID.aspx">
<system.web>
<authorization>
<allow users="?" />
<deny users="*" />
[code]...

View 4 Replies

Security :: After Login To New Page And Moving Back To Login Page And Getting Resource Not Available

Jan 11, 2011

I am using Visual Studio 2008 Express and created a login page using the ASP.net web site Adminstration tool security to generate users and passwords.

After login, a new page appears. I have a button to go back to the login page to allow a user to relogin. When I try loging in again as a different user or the same, I get an error saying the resource that I am looing for was not available.

I have a button on the page after login (one this one page will occur) and I am using on on click event to do the following:

FormsAuthentication.Initialize()
FormsAuthentication.SignOut()
Response.Redirect("~/Login.Aspx")

After clicking on this button, the Login page appears again. How can I release everyting to allow it to work like when I first open the application.

This is the error message I get:

Description:
HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.

Requested URL: /MyFirstSite/default.aspx

Version Information: Microsoft .NET Framework Version:2.0.50727.3615; ASP.NET Version:2.0.50727.3618

Server Error in '/MyFirstSite' Application.

The resource cannot be found.

View 4 Replies

C# - Guest Denied Access To Admin Folder Redirected To Login.aspx

Jan 20, 2010

I am using the following in my webconfig, so that only admin an access the admin folder.

<location path="Admin" allowOverride="true">
<system.web>
<authorization>
<allow roles="Administrators" />
<deny users="*" />
</authorization>
</system.web>

Now when the guest user tries to access this he is redirected to the Login page. I want the user to either sho a popup that user cannot access it or just stay on the same page with some error message in a label on that page... Here is more code in webconfig

<authentication mode="Forms">
<forms loginUrl="Login.aspx" protection="All" name="Cookie" timeout="120" path="/" slidingExpiration="true"
defaultUrl="Default.aspx">
</forms>

View 3 Replies

Security :: Login Sql Statement / Tier Project A That Required A Login Page>

Jan 11, 2011

i doing on a 3 tier project a that required a login page, Im not sure how the flow go for the 3 tier...This is my BLL

[Code]....

This is my DAL

[Code]....

And lastly here is the aspx page

[Code]....

When i try to insert my NRIC and password, it's like not passing through the statement, it just say login sucessfully eventhough i put the wrong NRIC/Password/Not valid..

View 3 Replies

Security :: Catch A Failed Login Attempt (Windows Auth) And Redirect To A Forms Login Page?

May 26, 2010

I need to create an application with Forms Authentication and/or Windows Authentication. If the application is set to use mixed authentication (Forms + Windows Auth) and the user don't have a Windows user account, the login will fail and he must be redirected to a forms login page. How can I do this?

Are there any different way to provide mixed authentication?

View 1 Replies

Security :: Make Login.aspx Called By A Form At Page Load And Return To It After Successful Login

Apr 12, 2010

A Login.aspx has been created to enforce security on several forms of a web site.How can it be best called by each form at page load and return to that form after succesful login? How could that requirement be declared in web.config?

View 3 Replies

Security :: Add ReturnUrl But Don't Get Redirected?

Apr 8, 2010

For a testproject I use two Login pages. I order to do that I use a dispatcher page:

Dispatcher:

[Code]....

I then just redirect in the dispatcher to the real login-page according to the ReturnUrl. So far so good. The only problem I have is that I don't get redirected to the ReturnUrl once I'm logged in... Of course I add the ReturnUrl to the forwarded Login-Page (/Admin/Login.aspx?ReturnUrl=...).

View 5 Replies

Security :: Cannot Login And Always Remain In Login Page

Mar 11, 2010

In debug mode in VS 2008, the login page can go to the default page.

But now when deployed to IIS in windows 7, the login page cannot go to the default page and remain in login page after login.

I don't know why there is different behavior between these two.

In web config,

<authentication mode="Forms">
<forms name="FormsAuthDB.AspxAuth" defaultUrl="~/Default.aspx" loginUrl="~/Login.aspx" protection="All" timeout="20" path="/"/>
</authentication>

View 1 Replies

Security :: Used Security In Login Page Which Restricts All Users Who Have Not Logged In To All Pages?

Jun 23, 2010

i used security in login page which restricts all users who have not logged in to all pages. I need to restrict specific users to specific pages. I'm not using AspSqlService provider. So i cannot create roles and restrict automatically. And the pictures i use in login page are not visible @ runtime.

View 1 Replies

Security :: Redirect To Main.aspx After Successful Login Attempt In Login.aspx Page

Apr 25, 2010

I'm trying to develop a simple web application where I need to redirect to main.aspx after successful login attempt in login.aspx page.However,it is redirecting the page to defualt.aspx... Is there a way to redirect my application to main.aspx??

View 3 Replies

Security :: Login Form Rejecting Valid Login With Forms Based Security And Membership Service

Jan 21, 2010

I've set up a system with forms based authentication and using the asp:Login control. When I put in an invalid password I get the approriate invalid password message. However when I put in a valid password, it does nothing...just returns to the login page again. I'm triple checked the login info. There is no error message, and the invalid attempts counter doesn't increment. When I put a break point in the Login_LoggedIn event of the Login form, it hits it, but User.Identity.IsAuthenticated is false. I'm not 100% sure it should be true at this point, as I'm pretty new to .NET but it seems kind of odd.

My user database is stored in a sqlserver 2005 db that already existed. I've added a new connection for it.In the authorization I have

<authorization>deny
users="?"/><authorization>

View 2 Replies

MVC :: Redirected To The Log In Page / Color Box?

Feb 27, 2011

Ihave a controller that returns System.Web.Mvc.FilePathResult

I do return this.File(filename, contentType, download name);

This action is called when user is clicked on a link and I have made $("a[rel='popup']").colorbox();

.So whenever a user clicks on the links It takes to the controller method and the file Shown in the colour box.

Now I am facing an issue it is like If a user is logged in to my site and open a page , where links are shown and the user goes away from his seat (ie session expires) Then he come back and clicks on the link .At that time my application breaks as there is no valid session.

So tried to return View("LogOn"); when session is null.

But as still it is not redirected to the I think it is because of the colorbox

I should be redirected to the log in page Even if I am taking a Color box ?

View 3 Replies

Possible To Tell If Redirected To An Aspx Page?

Dec 22, 2010

I am redirecting users to a specific page based on some criteria. I know I can pass some url parameters indicating that there was a redirect. But is there any other way to tell it without turning to the url string?

View 2 Replies

MVC :: Get The URL Of A Page From Which User Has Redirected?

Nov 16, 2010

I have a page containing a form which can be accessed from two pages. I want to set a button on this page depending on the page from which I redirect.

For eg., if I redirect from page 1, the button should be back to page 1 and I redirect from page 2, the button should be back to page 2. I don't want it to be a back button by the way.

How can I set this condition? Url.Action redirects to a page but how can I get the page from which I have redirected?

Also the form which when submitted should redirect back to the page from which the form page has been accessed.

View 3 Replies

MVC :: Order.asp Page To Be Redirected And Parameters For That Page To Redirect To MVC

Sep 6, 2010

So i want to run a single .net 4 web page in one folder, but there will be older classic asp files in that folder that have to work.

so say i have..

Order (folder)

orderitem.asp

shoppingcart.asp

i want the shoppingcart to work as classi asp (no change)

But i want the order.asp page to be redirected and parameters for that page to redirect to MVC say ordercontroler.. order actionview and have the redirected link as order/order/23420984 from order/orderitem.asp?part=23420984

View 4 Replies

Security :: Redirecting Users From Forgot Password Page To Login Page?

Feb 7, 2011

I have created a forgot password page with a PasswordRecovery control in it.

<asp:PasswordRecovery ID="PasswordRecovery1" runat="server"
BorderColor="#E6E2D8" BorderPadding="4" BorderStyle="Solid" BorderWidth="1px"
Font-Names="Verdana" Font-Size="0.8em" Height="210px"
onsendingmail="PasswordRecovery1_SendingMail" Width="491px">

I want to redirect the user back to the login.aspx page once the user clicks the Forgot Password button.

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved