473,396 Members | 1,864 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 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 7625
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Billy Jacobs | last post by:
I have a web application which is using Forms Authentication. The main page of the site is a frames page. If I type in the url to the frames page, it loads the login page inside of the main...
11
by: ElmoWatson | last post by:
I tried on the Security newgroup, as well as other places, and haven't gotten an answer yet - - I'm pulling my hair out over this one. I'm trying to get Forms Authentication working.....I can get...
2
by: VR | last post by:
Hi, I am using Forms type of authentication, but having problems redirecting users to default page after they get authenticated. My default page is default.aspx, but it's in 'public'...
0
by: Anonieko Ramos | last post by:
ASP.NET Forms Authentication Best Practices Dr. Dobb's Journal February 2004 Protecting user information is critical By Douglas Reilly Douglas is the author of Designing Microsoft ASP.NET...
1
by: AVance | last post by:
Hi, I've come across this scenario in ASP.NET 1.1 with forms authentication where the forms auth doesn't seem to timeout correctly, nor redirect to the login page. I have done some testing, and...
18
by: Rippo | last post by:
Hi I am using role base forms authentication in asp.net and have come across a problem that I would like advice on. On a successful login a session variable is set to identify a user. This is...
1
by: Stu | last post by:
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...
1
by: =?Utf-8?B?SGFyZHkgV2FuZw==?= | last post by:
Hi all, I am running ASP.NET 2.0, after login I need to pass CustomerID in my database instead of username to other pages. I added following code to my login.aspx protected void...
1
by: Jeremy | last post by:
I have a web app that contains forms authentication to protect subdirectory called "admin" by denying anonymous users. When I request a protected resource in the admin directory I am presented with...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.