0

I have asp.net application with Windows Authentication. I need to redirect to one page when the session expires.

I have set the timeout in web.config file.

< sessionstate mode ="Inproc" timeout="5"/>

In Session_End event of Global.asax file, I have below code

Response.Redirect(".../CommonPage.aspx");

When I debug the code, I got breakpoint hit after 5mins of idle in Session_End event. But the application is not redirected to CommonPage.aspx.

Kindly give me solution on how to redirect to particular page on session expiration in Windows authentication.

Sarath
  • 131
  • 2
  • 13
  • 2
    The session times out when no requests have come from the browser for 5 minutes. There's no request -> there's nothing to send a response *to*. The user may even have shut down their browser/computer. – Damien_The_Unbeliever Feb 12 '15 at 13:42

1 Answers1

0

As commented by @Damien_The_Unbeliever you can't but found one hack so could not prevent my self from sharing very nice answer

https://stackoverflow.com/a/484993/1505865

Check out above answer its very good hack or work around to achieve what ever you mentioned in the question.

Community
  • 1
  • 1
Jenish Rabadiya
  • 6,708
  • 6
  • 33
  • 62