简体   繁体   中英

after publishing webapplication, session.timeout automatically set to default?

In my webapplication, I have set a timeout for the session so that if the user stays inactive for more an hour, they will be logged out.

this is set in the startup.auth.cs file and works perfectly running locally thanks to the Nuget packages of Windows.Owin...

Though, after publishing the project and putting it on the webserver, the timeout is suddenly set to 20 minutes instead of the 1 hour I had initially set and thus this forces users out of my application after 20 minutes because it takes some default setting.

when searching through my published files, I can no longer find the startup.auth.cs nor can I find anything connected to it or even something that looks like it.

how do I change this? how do I include my startup.auth.cs into the publish or do something so that the session stays open for the complete hour that I requested instead of the default 20 minutes.

the file "startup.auth.cs" is included in the project so it's not like it should be ignoring it when running the publish.

unfortunately I can not show you any code today; it is confidential. fortunately I should not have to show code for this question.

Change the session state configuration in Web.config (Default: 20 minutes)

  <sessionState timeout="120">

And is IIS you can change idle timeout value IIS Manager > Application Pools > DefaultAppPool > Properties > Performance Go to this form and you can change the session timeout as per your requirement

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM