【发布时间】:2011-11-21 21:25:46
【问题描述】:
我想在我的 WCF REST 服务中将 cookie 名称设置为不同的名称。
我已经在 Web.config 中设置了:
<system.web>
<compilation debug="true" targetFramework="4.0" />
<sessionState timeout="99999" mode="InProc" cookieName="xxx"/>
</system.web>
但它不起作用:
请求:
POST http://localhost/wcfrest/logon HTTP/1.1
User-Agent: Fiddler
Content-Type: application/json
Host: localhost
Content-Length: 40
{"Username":"sdf","Password":"sadfsdaf"}
回复:
HTTP/1.1 200 OK
Cache-Control: private
Content-Length: 19
Content-Type: application/json; charset=utf-8
Server: Microsoft-IIS/7.5
X-AspNet-Version: 4.0.30319
Set-Cookie: .ASPXAUTH=780210B[...]7627C58; expires=Thu, 22-Sep-2011 11:46:06 GMT; path=/
X-Powered-By: ASP.NET
Date: Wed, 21 Sep 2011 11:46:06 GMT
{"Successful":true}
我还有什么其他的改变吗?
谢谢。
【问题讨论】:
标签: asp.net session session-cookies wcf-rest