471,354 Members | 1,729 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,354 software developers and data experts.

Forms Authentication Not Redirecting To Login Page

Stu
Hi All,

I have an ASP.NET application to which I have implemented forms
authentication to handle security. It is a relatively straight forward
solution with all aspx pages residing in the root folder.

The issue I am experiencing is that when the authentication time out is
activated and the user is hence unauthenticated, the browser window is on
sometimes redirecting back to the login page. When the browser does or
doesn't redirect to the login page seems to be defined by the page the user
is trying to access as a very few aspx pages when requested will redirect to
the login page correctly.

This seems to be platform independed as the exact same behaviour is
experienced on my local development machine running WinXPSP2 and a Win2K3
Server.

Has anyone any ideas as to why this may be happening and/or have any
suggestions to aid in the investagation?

The web.config contents:
<configuration>
<system.web>
<compilation defaultLanguage="c#" debug="true" />
<authentication mode="Forms">
<forms name=".RENOWNSUPPORTAUTH" loginUrl="login.aspx" protection="All"
timeout="1" path="/" slidingExpiration="true" />
</authentication>
<authorization>
<deny users="?" /> <!-- Deny access to all unauthenticated users -->
</authorization>
</system.web>

<location path="login.aspx">
<system.web>
<authorization>
<allow users="*" /> <!-- Allow all users -->
</authorization>
</system.web>
</location>
<location path="error.aspx">
<system.web>
<authorization>
<allow users="*" /> <!-- Allow all users -->
</authorization>
</system.web>
</location>
</configuration>
Jul 22 '05 #1
1 7337
Stu
Further to this, the error that is being returned when the redirect fails to
occur is:

Access is denied.
Description: An error occurred while accessing the resources required to
serve this request. The server may not be configured for access to the
requested URL.

Error message 401.2.: You do not have permission to view this directory or
page using the credentials you supplied. Contact the Web server's
administrator for help.
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.2032; ASP.NET
Version:1.1.4322.2032
"Stu" wrote:
Hi All,

I have an ASP.NET application to which I have implemented forms
authentication to handle security. It is a relatively straight forward
solution with all aspx pages residing in the root folder.

The issue I am experiencing is that when the authentication time out is
activated and the user is hence unauthenticated, the browser window is on
sometimes redirecting back to the login page. When the browser does or
doesn't redirect to the login page seems to be defined by the page the user
is trying to access as a very few aspx pages when requested will redirect to
the login page correctly.

This seems to be platform independed as the exact same behaviour is
experienced on my local development machine running WinXPSP2 and a Win2K3
Server.

Has anyone any ideas as to why this may be happening and/or have any
suggestions to aid in the investagation?

The web.config contents:
<configuration>
<system.web>
<compilation defaultLanguage="c#" debug="true" />
<authentication mode="Forms">
<forms name=".RENOWNSUPPORTAUTH" loginUrl="login.aspx" protection="All"
timeout="1" path="/" slidingExpiration="true" />
</authentication>
<authorization>
<deny users="?" /> <!-- Deny access to all unauthenticated users -->
</authorization>
</system.web>

<location path="login.aspx">
<system.web>
<authorization>
<allow users="*" /> <!-- Allow all users -->
</authorization>
</system.web>
</location>
<location path="error.aspx">
<system.web>
<authorization>
<allow users="*" /> <!-- Allow all users -->
</authorization>
</system.web>
</location>
</configuration>

Jul 22 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Billy Jacobs | last post: by
11 posts views Thread by ElmoWatson | last post: by
2 posts views Thread by VR | last post: by
reply views Thread by Anonieko Ramos | last post: by
18 posts views Thread by Rippo | last post: by
1 post views Thread by =?Utf-8?B?SGFyZHkgV2FuZw==?= | last post: by
1 post views Thread by Jeremy | last post: by
reply views Thread by XIAOLAOHU | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.