Re: FormsAuthentication doesn't automatically redirect upon timeout



Yes, ASP.NET needs to know if the visitor is authorized to view that path or not. Glad that you found what was wrong.

--
All the best,
Coskun SUNALI
MVP ASP/ASP.NET
http://sunali.com
http://www.propeople.dk

"Christine Nguyen" <christine.nguyen@xxxxxxxxx> wrote in message news:egdpe%23PaIHA.4196@xxxxxxxxxxxxxxxxxxxxxxx
I figured out what the problem is, I needed to add the following setting to the web.config.

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

Thanks for trying to help!
Christine


"Christine Nguyen" <christine.nguyen@xxxxxxxxx> wrote in message news:exNMC2OaIHA.208@xxxxxxxxxxxxxxxxxxxxxxx
Hello,

Here is a sample website I set up to illustrate what's going on. Thanks!

-Christine


"Coskun SUNALI [MVP]" <Coskun@xxxxxxxxxx> wrote in message news:eWOSU3KaIHA.4196@xxxxxxxxxxxxxxxxxxxxxxx
Hi,

Sorry for my previous message. It has nothing to do with your problem.

Can you please attach a project in a zip file to reproduce the problem you
have.

I will try to correct it and send it back.

--
All the best,
Coskun SUNALI
MVP ASP/ASP.NET
http://sunali.com
http://www.propeople.dk

"Coskun SUNALI [MVP]" <Coskun@xxxxxxxxxx> wrote in message
news:%23$XUljKaIHA.1208@xxxxxxxxxxxxxxxxxxxxxxx
Hi,

Yes. If you have a HttpModule that logs and then cleans the errors on the
server, ASP.NET doesn't redirect.

--
All the best,
Coskun SUNALI
MVP ASP/ASP.NET
http://sunali.com
http://www.propeople.dk

<christine.nguyen@xxxxxxxxx> wrote in message
news:b25bf414-af61-4080-b0f9-96999984832b@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hello,

I do specify the login url in web.config, but for whatever reason it
doesn't redirect upon timeout when a secured resource is accessed.
Instead it throws an exception when I try to access and use the value
in HttpContext.Current.User.Identity.Name (which is now empty). This
is why i put code into the onLoad in order to prevent the exception.
Is there a reason why it wouldn't redirect even though I have the
login url specified in web.config?


Thanks,
Christine








.



Relevant Pages

  • Re: Bypass forms authentication
    ... > My application uses forms-based authentication. ... If the database connection fails I want the user ... > subfolder and set the authorization to allow all users, ... but it doesn't work if I redirect in the code. ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Forms Authentication & Application_AuthenticateRequest
    ... If you don't have a login, then a person clicks on the Registration button ... to redirect to the page of their choice. ... HttpApplication app = sender; ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: Does a response.redirect process the rest of the page?
    ... >> I should explicitly close my recordset and database connections ... > Redirect does what it says. ... Assign the data contained in the database objects to variables (including ... Microsoft MVP - ASP/ASP.NET ...
    (microsoft.public.inetserver.asp.general)
  • Re: 0x80072EE7 error
    ... That's where a redirect would be occurring. ... MowGreen [MVP 2003-2008] ... There are no static entires in my hosts file for Windows update. ... I'm starting to suspect a malware DNS redirector or some sort of DNS poisoning. ...
    (microsoft.public.windowsupdate)
  • Re: problems with windows basic authentication
    ... The user should login with his windows credentials in basic.aspx and automatically redirect to his own files. ... Dim ToSite As String ... The user_1 uses his windows credentials and will redirected to his own files app/basic/user_1/index.aspx, but this site doesnt work and i dont know why? ...
    (microsoft.public.dotnet.framework.aspnet)