.Net2.0 中Session储存位置多了几个选项

CodeProject-Jerry 2006-12-12 11:49:14
<sessionState
mode="[Off|InProc|StateServer|SQLServer|Custom]"
timeout="number of minutes"
cookieName="session identifier cookie name"
cookieless=
"[true|false|AutoDetect|UseCookies|UseUri|UseDeviceProfile]"
regenerateExpiredSessionId="[True|False]"
sqlConnectionString="sql connection string"
sqlCommandTimeout="number of seconds"
allowCustomSqlDatabase="[True|False]"
useHostingIdentity="[True|False]"
stateConnectionString="tcpip=server:port"
stateNetworkTimeout="number of seconds"
customProvider="custom provider name">
<providers>...</providers>
</sessionState>

.Net2.0中 新增加了几个 cookieless 选项:

AutoDetect

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


UseCookies

Cookies are used to persist user data regardless of whether the browser or device supports cookies.


UseDeviceProfile

ASP.NET determines whether to use cookies based on System.Web.HttpBrowserCapabilities setting. If the 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.

我的问题如下:
选择UseCookies 的时候, 如果客户端cookie可用,那么保存在cookie中的是:
A:) 一个SessionID
B:) 所有的Session值


如果客户端Cookie不可用,那么Session是不是保存在HTTP协议的Head中?
...全文
124 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
CodeProject-Jerry 2006-12-22
  • 打赏
  • 举报
回复
up
ice_frank 2006-12-15
  • 打赏
  • 举报
回复
UP
CodeProject-Jerry 2006-12-15
  • 打赏
  • 举报
回复
怎么就是没人呢?
CodeProject-Jerry 2006-12-13
  • 打赏
  • 举报
回复
UseCookies
hegang888888888 2006-12-12
  • 打赏
  • 举报
回复
magicmaster 2006-12-12
  • 打赏
  • 举报
回复
COOKIE不可用只能放URL保存吧
CodeProject-Jerry 2006-12-12
  • 打赏
  • 举报
回复
Up

62,266

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术交流专区
javascript云原生 企业社区
社区管理员
  • ASP.NET
  • .Net开发者社区
  • R小R
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

.NET 社区是一个围绕开源 .NET 的开放、热情、创新、包容的技术社区。社区致力于为广大 .NET 爱好者提供一个良好的知识共享、协同互助的 .NET 技术交流环境。我们尊重不同意见,支持健康理性的辩论和互动,反对歧视和攻击。

希望和大家一起共同营造一个活跃、友好的社区氛围。

试试用AI创作助手写篇文章吧