Mik*_*108 5 asp.net cookies webforms internet-explorer-10
当我在Windows 7中使用IE10时,FormsAuthentication.SetAuthCookie在IIS 6.0中不起作用.我使用Fiddler来监视cookie,我发现在IIS 6.0和IE10中,它没有设置cookie.
测试用例结果:
页面代码很简单:
protected void Page_Load(object sender, EventArgs e)
{
System.Web.Security.FormsAuthentication.SetAuthCookie("Demo", false);
Run Code Online (Sandbox Code Playgroud)
谢谢.
当您的请求到达客户端时,您的身份验证 cookie 就会被设置。确保没有任何可能强制 asp.net 运行时重定向到错误页面的错误。
此外,response.Redirect 可能会导致问题。
| 归档时间: |
|
| 查看次数: |
1783 次 |
| 最近记录: |