我有一个SharePoint站点。 我们有一些web部件呈现ascx控件。
在Web配置和iis设置中,会话超时和IIS空闲超时设置为2小时(120分钟)。 我已确认会话不超时30分钟的空闲时间后,应用程序中的下拉列表和复选框列表变为空白我的Visual Studio调试器附加到我的应用程序,并让应用程序闲置30分钟以查看发生了什么。 在我尝试回发30分钟后,我在调试器中观察了变量。 我发现会话变量是活着的并且有值。 然而,下拉和ViewState变量是空的。
我们正在使用SQL服务器会话。 我无能为力,在这个问题上度过了很多夜晚,但似乎没有得到任何地方。
I have a SharePoint site. We have some web parts rendering ascx controls.
Session time out and IIS idle time out is set to 2 hours (120 mins) in web config and iis settings. I have confirmed that session does not time out After 30 minutes of idle time the drop downs and check box list in application becomes empty I had Visual studio debugger attached to my application and had the application idle for 30 minutes to see what is happening. After 30 mins when I try to post back, I watched variables in the debugger. I found the session variables were alive and had values. However the drop down and ViewState variables were empty.
We are using SQL server sessions. I am clueless and have spent nights on this issue but seem to get no where.
最满意答案
所以答案在尼古拉斯发表的文章的第二部分。 原来,Web应用程序有一个可以通过Powershell控制的设置
$ web = Get-SPWebApplication“ http:// mywebapp ...”$ web.FormDigestSettings.TimeOut
这是默认的30分钟,SharePoint ViewState缓存在FormDigestSettings.TimeOut +1(即31分钟)后被清除,
$ web.FormDigestSettings.TimeOut = New-TimeSpan -Hours 1-Minin 0
增加这段时间可能会有一些性能影响,因此鼓励您阅读文章。
http://blogs.msdn.com/b/besidethepoint/archive/2013/03/27/appfabric-caching-and-sharepoint-2.aspx
So the answer is in the Part 2 of the article that Nicholas posted. Turns out that web application has a setting that can be controlled through Powershell
$web = Get-SPWebApplication "http://mywebapp..." $web.FormDigestSettings.TimeOut
This is by default 30 minutes and SharePoint Viewstate cache is cleared after FormDigestSettings.TimeOut +1 (i.e. 31 minutes)
$web.FormDigestSettings.TimeOut = New-TimeSpan -Hours 1 -Minutes 0
Increasing this time out might have some performance implications hence encourage you to read the article .
http://blogs.msdn.com/b/besidethepoint/archive/2013/03/27/appfabric-caching-and-sharepoint-2.aspx
更多推荐
发布评论