网站在.NET 4.0 App中进入Cookieless状态

发布于 2024-12-23 17:49:35 字数 252 浏览 2 评论 0原文

每隔一段时间,我就会注意到我的网站会进入无 cookie 状态,尽管我没有在 web.config 中指定此选项。此外,尽管我对某些菜单项附加了特定的角色,但我的 ASP.NET 菜单控件显示了所有菜单项。

该网站似乎仍然安全,因为如果用户单击特定于角色的菜单项,它将将他们重定向到登录页面。

我还注意到,在 Elmah 中,我的注册和登录页面上有很多无效的视图状态错误消息。我以为我被黑客攻击了。关于如何防止这种情况有什么建议吗?

谢谢你!

Every once in a while I notice my site goes into a cookieless state, although I don't have this option specified in my web.config. In addition my ASP.NET Menu control shows all the menu items although I have specific roles attached to some menu items.

It seems the site is still secure because if the user clicks on a menu item thats role specific it will redirect them to the login page.

I also noticed in Elmah there are a lot of Invalid Viewstate error messages on my registration and login pages. I assumed I am being hacked. Any tips on how to prevent this?

Thank you!

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

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

发布评论

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

评论(1

你的笑 2024-12-30 17:49:35

“虽然我的 web.config 中没有指定此选项。”

您确定吗?因为你所描述的听起来确实像这种模式:

<sessionState  cookieless="AutoDetect"

"although I don't have this option specified in my web.config. "

Are you sure? Because what you are describing sure sounds like this mode:

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