Session timeout in ASP.NET

后端 未结 15 2221
忘了有多久
忘了有多久 2020-11-22 09:14

I am running an ASP.NET 2.0 application in IIS 6.0. I want session timeout to be 60 minutes rather than the default 20 minutes. I have done the following

  1. Set <
15条回答
  •  长发绾君心
    2020-11-22 09:50

    Do you have anything in machine.config that might be taking effect? Setting the session timeout in web.config should override any settings in IIS or machine.config, however, if you have a web.config file somewhere in a subfolder in your application, that setting will override the one in the root of your application.

    Also, if I remember correctly, the timeout in IIS only affects .asp pages, not .aspx. Are you sure your session code in web.config is correct? It should look something like:

    
    

提交回复
热议问题