会话变量未保存

发布于 2024-11-09 05:10:35 字数 292 浏览 4 评论 0原文

我有使用表单身份验证的 MVC 应用程序。由于某种原因,只要用户未登录,我声明的任何会话变量都不会保存。我的应用程序需要支持经过身份验证和未经身份验证的用户。这些应用程序在本地运行时运行良好。该问题仅发生在我们的远程服务器上。我们使用 appfabric 来处理会话状态。我正在尝试解决问题,但我不知道从哪里开始。任何建议都将受到欢迎!

编辑-当我将 httpCookies domain = "future.domain.com" 的值更改为 httpCookies domain = "" 时,它工作正常。我们的管理员告诉我,我们需要不要更改此设置。

I have MVC application which uses Forms authentication. For some reason any session variable that I declare are not saving whenever the user is not logged in. My application needs to support both authenticated and unauthenticated users. The applications works fine when ran locally. The issue only occurs on our remote server. We're using appfabric for session state. I'm trying trouble shoot the issue but I don't know where to start. Any advice would be welcomed!

Edit-when I change the value for httpCookies domain = "future.domain.com" to httpCookies domain="" it works fine. I was told by our admins that we need this setting to not change.

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

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

发布评论

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

评论(1

对你再特殊 2024-11-16 05:10:35

11年后,但如果对那里的任何人仍然有用,有时如果你有多个打开的mvc项目,就会发生这种情况,我不知道为什么,但这通常发生在我身上,只需关闭未使用的项目,然后再试一次,如果这仍然不起作用,只需尝试重置 Visual Studio 或您的计算机

11 years later but if is still usefull for anybody there, sometimes this happend if you have more than one project of mvc open, i dont know why but that usually happened to me, just close the projects that are not in use and try again, if this still does not work, just try to reset visual studio or your computer

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