Redirect problem in IE7

I

ira.gladnick

I have the AcquireRequestState code listed below in Global.asax, to
redirect users to the login page when a sesions expires.

This works like a charm in Firefox. But in Internet Explorer 7, the
following error message gets displayed: "Internet Explorer cannot
display the webpage. Most likely causes: You are not connected to
the Internet. The website is encountering problems. There might be a
typing error in the address." If I then click the refresh button, the
login page finally does get displayed.

Any ideas on why IE7 seems to have a problem doing an immediate
redirect to the login page?

The code in Global.asax:

Protected Sub Application_AcquireRequestState(ByVal sender As Object,
ByVal e As System.EventArgs)
If Session.IsNewSession Then
If User.Identity.IsAuthenticated Then
FormsAuthentication.SignOut()
HttpContext.Current.Session.Clear()
HttpContext.Current.Session.Abandon()

FormsAuthentication.RedirectToLoginPage()
HttpContext.Current.Response.End()
end if
End If
End Sub
 

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,755
Messages
2,569,536
Members
45,011
Latest member
AjaUqq1950

Latest Threads

Top