I'm making some changes to my Forms Authentication to support authentication across multiple applications on the same server. Anyway, I've always had the below code in my Global.asax file:
If Session("UserID") Is Nothing Then
'we have an authenticated user
'with no current session
'so lets do this
'let's remove their authentication ticket
'then redirect them to logon.aspx
Basically I use it so that any authenticated user without a session will be redirected back to the login page. However, this same code is now causing an infinite redirect looping problem. (in google chrome it says "This webpage has a redirect loop"). As soon as I comment the code out I don't have the issue. And more mysteriously, it only happens in DeBug mode
1) Do I even need this code? As soon as the session expires doesn't that also mean the auth ticket expired? Therefore all the redirecting will be handled by the built in forms authentication?
2) Why would it only be causing an issue in DeBug mode?