Asp.net Session Expire soon on live Web server

拜拜、爱过 提交于 2019-12-02 05:36:05

问题


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 uploaded it on

LIVE SERVER

, after spend some time I not able to use session, it redirect me on Login.

Please tell me what i can do?

Thanks


回答1:


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.




回答2:


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.



来源:https://stackoverflow.com/questions/19311649/asp-net-session-expire-soon-on-live-web-server

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!