Asp.net Session Expire soon on live Web server

前端 未结 2 1160
广开言路
广开言路 2021-01-23 04:06

I am facing a problem about web application,

I have lost session too soon

, I have already set timeout and that related things.

it is done when I have u

相关标签:
2条回答
  • 2021-01-23 04:51

    Sorry i have to reply as answer not comment ,

    Type “inetmgr” in run window to open IIS from left pane “Connections” select your application. right click on your application and refer the image to open “Advanced Settings” of application(to check which ApplicationPool is referred by application )

    from “Application Settings” window you can see the Name of ApplicationPool. like Asp.net V4.0, DefaultAppPool, Asp.net V4.0 Classic.

    Right click on the ApplicationPool that was assigned to your Application and click on "Advanced Settings...."

    in the popup window ... check the Idle time out for ... that cause the timeout while web application is idle.

    enter image description here

    0 讨论(0)
  • 2021-01-23 05:11

    There're multiple ways why ASP.NET session state can be lost. The most common one is when the application pool recycles. This, in turn, can be due to IIS configuration (scheduled recycles), changes to the /bin folder or web.config file (can also be an anti-virus software that "touches" the files).

    In case the session state is maintained using cookies, there can be situations when the browser doesn't accept them (and therefore, doesn't pass them back resulting in a new session created every time). You can verify that the cookies are sent (and that the value is not changing within the same session) by using Fiddler or F12 tools of your choice (the name of the cookie is ASP.NET_SessionId).

    You may also check the sessionState configuration element in your web.config file to make sure those settings are correct (more on the subject: MSDN article).

    Also, check the Event Log ("Application" log where the "Source" would be "ASP.NET X.X.X.X" where "X.X.X.X" is the framework version). In cases like this, there's usually some useful information in there.

    Hope this helps.

    0 讨论(0)
提交回复
热议问题