【问题标题】:StateServer sessionState and JQGridStateServer sessionState 和 JQGrid
【发布时间】:2016-02-11 07:13:54
【问题描述】:

我的用户经常从 Web 应用程序中注销,因此我尝试使用 <sessionState mode="StateServer" cookieless="false" timeout="480" />,但我收到服务器错误 500,因为无法序列化 JQGrid。有什么想法吗?

【问题讨论】:

  • jqGrid 只是向服务器发送 HTTP 请求。错误500表示服务器代码错误。用户的登录/注销状态是纯服务器问题。
  • 感谢您的回复,奥列格。我使用 JQGrid MVC,大量的服务器端代码。出现错误 500 是因为所有会话状态数据都必须在 StateServer 会话状态模式下进行序列化。我无法在服务器上的模型中序列化我的 JQGrid 实例。换句话说,所有没有 JQGrid 实例但没有一个工作并发出错误 500 的页面都可以正常工作。

标签: jqgrid stateserver


【解决方案1】:

将 Webconfig sessionState 更改为 InProc 并将 IIS WorkerProcess 更改为 1

"<system.web>    
<sessionState mode="InProc" timeout="25"></sessionState>

【讨论】:

  • 不,我想使用 StateServer,因为出于某种原因 w3wp.exe 每小时都会终止,我不希望我的用户注销。
【解决方案2】:

我停止使用

Session["MyGridState"] = model.MyGrid.GetState();

【讨论】:

    猜你喜欢
    • 2023-03-20
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-09-01
    • 1970-01-01
    • 2019-05-01
    • 2011-06-24
    • 1970-01-01
    相关资源
    最近更新 更多