我怎样才能从我的网址删除ASP.NET会话ID? [英] How can I remove the ASP.NET Session ID from my URL?
问题描述
如何从我的网址删除标识?
在这个例子中URL我只需要的Index.aspx
,我怎么删除(S(w0uz0245gtucb3am0k5w5g55))
?
http://www.example.com/(S(w0uz0245gtucb3am0k5w5g55))/index.aspx
块引用>解决方案您的Web服务器重写你的URL包括会话状态,因为你已经配置你的网站不使用cookies。
如果你看看你的网站的
的web.config
文件,你可能会发现这一行:<的sessionState无Cookie =真/>
如果您将值更改为假,如果能解决你的问题(或只是删除该行完全 - 默认值为false)
有关此配置How can I remove the identifier from my URL?
In this example URL I need just
index.aspx
, how do I remove(S(w0uz0245gtucb3am0k5w5g55))
?http://www.example.com/(S(w0uz0245gtucb3am0k5w5g55))/index.aspx
解决方案Your webserver is rewriting your urls to include the session state because you have configured your site to not use cookies.
If you look at your site's
web.config
file, you will probably find this line:<sessionState cookieless="true" />
If you change the value to "false" if will solve your problem (or just remove the line entirely - the default value is false)
More information about this configuration can be found here and here.
这篇关于我怎样才能从我的网址删除ASP.NET会话ID?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!