InProc 会话状态不起作用

发布于 2024-08-06 15:37:16 字数 226 浏览 2 评论 0原文

任何人都知道为什么服务器 InProc 会话状态无法工作?有没有手动重置或者检查的方法?

谢谢,

Session模式是InProc,超时时间是25分钟。

这时候我不确定Session对象是否为null,或者session对象是否为空并且无法访问。

我认为这可能是 cookie 问题,或者可能是 Application_Start 未正确触发。还能是什么? IIS 设置?

Anyone have any ideas why a servers InProc session state would not be working? Is there a manual reset for it, or a way to check?

Thanks

Session mode is InProc, timeout is 25 minutes.

At this time I'm unsure if the Session object is null, or if the session object is empty and cannot be accessed.

I'm thinking it could be a cookie issue, or it could be that Application_Start doesn't fire properly. What else could it be? IIS settings?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

别挽留 2024-08-13 15:37:16

我知道这篇文章很旧,但我希望这会对某人有所帮助。
我的不起作用,我发现我需要将 httpModules 添加到 web.config 文件中。

Web.config:

<sessionState mode="InProc" cookieless="false" timeout="20"
 sqlConnectionString="YourConnectionString">
</sessionState>

<httpModules>
   <add name="Session" type="System.Web.SessionState.SessionStateModule"/>
</httpModules>   

I know this post is old, but I hope this will help someone.
Mine didn't work and I found out that I needed to add httpModules to web.config file.

Web.config:

<sessionState mode="InProc" cookieless="false" timeout="20"
 sqlConnectionString="YourConnectionString">
</sessionState>

<httpModules>
   <add name="Session" type="System.Web.SessionState.SessionStateModule"/>
</httpModules>   
心安伴我暖 2024-08-13 15:37:16

确保您没有在 Application_Start 事件中设置会话变量。这就是 Session_Start 的用途。

另外,您的应用程序是否已预编译?如果是这样,请查看此知识库文章

重置选项:

  • 运行IISReset

  • 重新启动全球网络
    发布(W3SVC) 服务。

  • 手动回收 IIS 中的应用程序池

Make sure you aren't setting Session variables in your Application_Start event. That is what the Session_Start is for.

Also, is your application pre-compiled? Check this KB article if so.

Reset Options:

  • Run IISReset

  • Restart the World Wide Web
    Publishing(W3SVC) service.

  • Manually recycle the App Pool in IIS

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文