I would like to auto-redirect to login page when session time outs.
In web.config file, i have the following code
If you are using something like FormsAuthentication
for maintaining the security of your application, then this part (that part that you are trying to do) will be done for you. If FormsAuthentication discovers that a user's session has expired it will redirect him or her back to you login page.
Second, don't rely too much on Session_End
because it will never trigger if you change session provider from InProc to SQLServer or other out of process provider.