Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
476 views
in Technique[技术] by (71.8m points)

ASP.NET Why are sessions timing out, sessionstate timeout set

Hey I have the following line in my web.config

<sessionState mode="InProc" timeout="45"/>

Which I thought would keep sessions intact for 45 mins

But I have seen the case where if a user is inactive for lets say 15 mins the sessions times out.

How can I stop this ?

Edit : Just noticed I have the following line in the master page

meta http-equiv="Refresh" content="1800;URL=http://www.virtualacademy.ie/login.aspx">

Maybe this is causing the issue, what is the above line doing i.e the number 1800

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Be sure to check your IIS configuration because the application pool that your site is hosted on also has its own timeout value which will override your own .config.

To increase it,

  1. Open IIS
  2. Select Application Pools on the left side
  3. Select the Application Pool used by your site
  4. Choose advanced settings
  5. Under Process Model categtory increase the 'Idle Time-out' value to the desired length.

Hope this helps.

(If you do not have a dedicated server / access to IIS with your hosting provider you will have to contact them to see if they can increase it for you)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...