我该如何手动删除由子域为asp.net身份验证设置的cookie?
该cookie是在setter.test.com上设置的;
在我在
该cookie是在setter.test.com上设置的;
<authentication mode="Forms">
<forms domain="test.com" loginUrl="Default.aspx" protection="All" path="/" requireSSL="false" timeout="45" name=".ASPXAUTH" slidingExpiration="true" defaultUrl="Default.aspx" cookieless="UseDeviceProfile" enableCrossAppRedirects="false"/>
</authentication>
在我在
getter.test.com
应用中,这是我的登出代码(移除该cookie):public ActionResult LogOut()
{
//Manually remove the cookie created by 3rd party authentication
if (Request.Cookies[".ASPXAUTH"] != null)
{
HttpCookie myCookie = new HttpCookie(".ASPXAUTH");
myCookie.Expires = DateTime.Now.AddDays(-1d);
Response.Cookies.Add(myCookie);
}
}
这个不起作用。