如何ASP.Net无Cookie工作? [英] How does ASP.Net Cookieless work ?

查看:131
本文介绍了如何ASP.Net无Cookie工作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试设置<的sessionState / GT&; 在我的web.config,但是我不知道它们是什么。
我想了解ASP.Net < SessionState会无Cookie =/方式>

 <的sessionState无Cookie =*****>


  1. 自动检测

  2. UseCookies

  3. UseDeviceProfile

  4. UseUri

  5. 真正


让我知道,与短信。


解决方案

  

指定的cookies如何用于Web应用程序。


  
  

的Cookie的属性可以是以下值中的一个。
  默认值为UseCookies值。


  
  

请注意当您配置一个支持ASP.NET AJAX的网站只有使用
  UseCookies对Cookie的属性的默认值。设置
  使用Cookie的EN codeD中的URL不被支持ASP.NET
  AJAX客户端脚本库。


  
  

说明


  
  

自动检测 ASP.NET决定请求的浏览器或设备是否支持Cookie。如果请求的浏览器或设备支持
  饼干,自动检测使用cookies坚持用户数据;否则,一个
  标识符在查询字符串使用。如果该浏览器或设备
  支持Cookie,但目前禁用cookie,饼干
  仍在使用的请求的功能。


  
  

UseCookies 缓存保持用户数据,而不管浏览器或设备是否支持Cookie。


  
  

UseDeviceProfile ASP.NET决定是否使用基于的HttpBrowserCapabilities设置cookie。如果的HttpBrowserCapabilities
  设置指示浏览器或设备支持Cookie,饼干
  是使用;否则,一个标识符在查询字符串使用。


  
  

UseUri 的调用功能使用查询字符串来存储标识符,无论浏览器或设备支持
  饼干。


也看看 http://msdn.microsoft.com/en -us /库/ h6bb9cz9.aspx

I try to set the <sessionstate /> in my web.config but I don't know what are they. I would like to know about ASP.Net <SessionState cookieless="" />.

<sessionState cookieless="*****"> 

  1. AutoDetect
  2. UseCookies
  3. UseDeviceProfile
  4. UseUri
  5. true
  6. false

Let me know with short note.

解决方案

Specifies how cookies are used for a Web application.

The cookieless attribute can be one of the following possible values. The default is the UseCookies value.

Note When you configure an AJAX-enabled ASP.NET Web site, use only the default value of UseCookies for the cookieless attribute. Settings that use cookies encoded in the URL are not supported by the ASP.NET AJAX client script libraries.

Value Description

AutoDetect ASP.NET determines whether the requesting browser or device supports cookies. If the requesting browser or device supports cookies, AutoDetect uses cookies to persist user data; otherwise, an identifier is used in the query string. If the browser or device supports cookies, but cookies are currently disabled, cookies are still used by the requesting feature.

UseCookies Cookies persist user data, regardless of whether the browser or device supports cookies.

UseDeviceProfile ASP.NET determines whether to use cookies based on the HttpBrowserCapabilities setting. If the HttpBrowserCapabilities setting indicates that the browser or device supports cookies, cookies are used; otherwise, an identifier is used in the query string.

UseUri The calling feature uses the query string to store an identifier, regardless of whether the browser or device supports cookies.

have also a look at http://msdn.microsoft.com/en-us/library/h6bb9cz9.aspx

这篇关于如何ASP.Net无Cookie工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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