已识别登录 - 该号码是否有后端存储?

发布于 2024-10-09 11:59:32 字数 174 浏览 0 评论 0原文

当您登录到 ASP.NET 应用程序时,您会收到一个登录 cookie(我认为它称为 ASPX_AUTH 或类似名称)。这个cookie的结构是什么?服务器是否实际上维护任何登录状态,或者纯粹是 cookie 中的内容(在这种情况下,我可以通过更改 cookie 过期时间来强制实现很长的登录状态吗?)

Tx,AJ。

When you log on to an ASP.NET app you are issued with a logon cookie (I think it's called ASPX_AUTH or similar). What is the structure of this cookie? Does the server actually maintain any logon state, or is it purely what's within the cookie (in which case, can I force a very long logon state by chaning the cookie expiry?)

Tx, AJ.

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

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

发布评论

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

评论(2

时光磨忆 2024-10-16 11:59:32

cookie 经过哈希处理和加密。
如果修改,它将失效。

此行为由 protection 属性控制Web.config 中的 > 元素

The cookie is hashed and encrypted.
If you modify it, it will become invalid.

This behavior is controlled by the protection attribute of the <forms > element in Web.config.

撕心裂肺的伤痛 2024-10-16 11:59:32

如果您想要较长的登录状态,或者为了使登录不超时,请在 web.config 的表单条目中设置两项内容:

timeout="_numer_of_months" movingExpiration="true"

这将使您的用户保持登录状态。

If you want a long logon state, or for the login to not timeout, set two things in forms entry in the web.config:

timeout="_numer_of_minutes" slidingExpiration="true"

This will keep your user logged in.

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