How to secure the ASP.NET_SessionId cookie? 设置ASP.NET_SessionId Secure=true

How to secure the ASP.NET_SessionId cookie?

To add the ; secure suffix to the Set-Cookie http header I simply used the <httpCookies>element in the web.config:

<system.web>
<httpCookies httpOnlyCookies="true" requireSSL="true" />
<system.web>

IMHO much more handy than writing code as in the article of Anubhav Goyal.

See: http://msdn.microsoft.com/en-us/library/ms228262(v=vs.100).aspx

上一篇:How to generate ssh key only for github and not conflict with original key


下一篇:02.CSS动画示例-->鼠标悬停图片旋转