加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 编程开发 > asp.Net > 正文

asp.net – 我可以使用Chrome DevTools在客户端查看会话状态值吗

发布时间:2020-12-16 00:34:51 所属栏目:asp.Net 来源:网络整理
导读:如果我们可以使用Chrome DevTools获取/查看网站的会话变量值,我只是好奇。 如果有人知道,请分享。 解决方法 不,您不能在客户端查看会话状态变量。会话状态存储在服务器端,客户端浏览器只知道存储在cookie或URL中的SessionID。 ASP.NET Session State Ove
如果我们可以使用Chrome DevTools获取/查看网站的会话变量值,我只是好奇。

如果有人知道,请分享。

解决方法

不,您不能在客户端查看会话状态变量。会话状态存储在服务器端,客户端浏览器只知道存储在cookie或URL中的SessionID。

ASP.NET Session State Overview

Sessions are identified by a unique identifier that can be read by
using the SessionID property. When session state is enabled for an
ASP.NET application,each request for a page in the application is
examined for a SessionID value sent from the browser. If no SessionID
value is supplied,ASP.NET starts a new session and the SessionID
value for that session is sent to the browser with the response.

By default,SessionID values are stored in a cookie. However,you can
also configure the application to store SessionID values in the URL
for a “cookieless” session.

Chrome浏览器几乎没有扩展功能来查看Cookie。我使用编辑这个Cookie。

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读