已识别登录 - 该号码是否有后端存储?
当您登录到 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
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.如果您想要较长的登录状态,或者为了使登录不超时,请在 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.