设置的sessionState无cookie ="真"在ASP.NET的,是会保持状态? [英] Set Sessionstate cookieless="true" in asp .Net, is the sessions state maintained?

查看:159
本文介绍了设置的sessionState无cookie ="真"在ASP.NET的,是会保持状态?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何才能会话状态保持在asp.Net,如果饼干在浏览器或无Cookie =真正的的中添加的在web.config中sessionmode 标签?

下面的标签显示无Cookie =真正的在web.config中。

 <的sessionState模式=是InProc
  无Cookie =真
  超时=30/>


解决方案

ASP.NET框架插入唯一的ID 来的网址,您可以通过禁用cookie的检查这或由无Cookie 属性设置为真正像你一样。

根据 MSDN : -


  

默认情况下,SessionID的值存储在一个永久的session
  cookie的浏览器。


如果您指定无Cookie =真正的则:


  

ASP.NET通过自动插入保持Cookie会话状态
  唯一的会话ID到页面的URL。


How can the session state be maintained in asp.Net, if the cookies are turned off in browser or cookieless="true" is added within sessionmode tags in web.config?

The following tag shows cookieless="true" in web.config.

<sessionState mode="InProc"
  cookieless="true"
  timeout="30"/>

解决方案

ASP.NET framework inserts a unique id to the URL, you can check this by disabling the cookie or by setting the cookieless attribute to true as you did.

According to MSDN:-

By default, the SessionID value is stored in a non-expiring session cookie in the browser.

If you specify cookieless="true" then:

ASP.NET maintains cookieless session state by automatically inserting a unique session ID into the page's URL.

这篇关于设置的sessionState无cookie =&QUOT;真&QUOT;在ASP.NET的,是会保持状态?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆