Click here to Skip to main content
15,867,834 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I created a simple ASP.NET Login page. I denied anonymous users from logging on to a folder called "content" which I created in the web.config file.

lt;location path="content">

<system.web>
<authorization>
<deny users="?"/>
</authorization>
</system.web>

</location>

When I run the program and login then the page opens fine

http://localhost:6409/Browsercloseendsession/content/Default.aspx

When I logout it directs to

http://localhost:6409/Browsercloseendsession/login.aspx

But when I press the back button of the browser.it again opens the

http://localhost:6409/Browsercloseendsession/content/Default.aspx

instead of taking it to the login page.

How to correct it? Please help
Posted
Comments
Madhukar Krishna 2-Jul-14 13:06pm    
Attention : This is only happening in VS2008 and not happening in VS2010
Madhukar Krishna 2-Jul-14 13:34pm    
authentication mode is "Forms"

 
Share this answer
 
Comments
Madhukar Krishna 2-Jul-14 13:39pm    
But the same website I created in VS 2010 is working fine. It goes to login page when I hit the back button of the browser-which goes to "/content/Default.aspx". Why is that it is working fine in
Visual Studio 2010 and not working in Visual Studion 2008
Found out guys ! The problem was with "Login Status". It should be set to "LogoutAction" to "Refresh" instead of "RedirectToLoginPage". But why is that ?.
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 10-Oct-14 3:06am    
Please, you should not post such content as "solution". This is considered as abuse.
Thank you for understanding.
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900