Forms Authentication Timeout

S

Stu

Hi all,

I have a forms authentication protected application that doesn't seem to
redirect back to the login page when the ticket expires. I have the
web.config set up (for testing purposes) as such:
<authentication mode="Forms">
<forms name=".RENOWNSUPPORTAUTH" loginUrl="login.aspx" protection="All"
timeout="1" path="/" slidingExpiration="false"/>
</authentication>

And after 1 minute has rolled around, the page displays this error and
doesn't redirect back to the login page as expected:
Server Error in '/FormsAuthenticationTest' Application
--------------------------------------------------------------------------------

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.
 
J

Joseph Bittman MCSD

August 6, 2005

That sounds strange. Are you in a sub folder when you get the error? Maybe
it is saying ./login.aspx of the page you are CURRENTLY on, and not from the
web.config's folder. Maybe try a absolute url path in the web.config? Hope
this helps!

--
Joseph Bittman
Microsoft Certified Solution Developer

Web Site: http://71.39.42.23
Static IP
 
S

Stu

Hi Joseph,

Nah, I'm not in a sub folder. I do use the <location> elements of the
web.config file though so perhaps there is something to do with that??? I
can't attribute the working/not working of the redirect to either of the
paths specifically set in the web.config but it is just a thought. I have
included the whole web.config...

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

<location path="login.aspx">
<system.web>
<authorization>
<allow users="*"/> <!-- Allow all users -->
</authorization>
</system.web>
</location>
<location path="logout.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>
<location path="scripts/">
<system.web>
<authorization>
<allow users="*"/> <!-- Allow all users -->
</authorization>
</system.web>
</location>
--
Cheers,
Stu


Joseph Bittman MCSD said:
August 6, 2005

That sounds strange. Are you in a sub folder when you get the error? Maybe
it is saying ./login.aspx of the page you are CURRENTLY on, and not from the
web.config's folder. Maybe try a absolute url path in the web.config? Hope
this helps!

--
Joseph Bittman
Microsoft Certified Solution Developer

Web Site: http://71.39.42.23
Static IP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top