MVC4 Forms 验证,部署到Hyper-v上.FormsAuthentication.SetAuthCookie无效的问题
2013-10-10 10:31
411 查看
这是IE10的一个bug或者说是asp.net4的一个Bug,在IE10里更改了http头,这样导致asp.net4认为客户端没有启用cookie,会导致验证失败。 简单的解决方法是,在网站根目录,新增一个浏览器定义文件(browser definition file) 步骤如下: 1.添加一个"App_Browsers"文件夹 2.添加一个"*.browser"后缀的文件,如IE10.browser. 3.添加文件内容如下: <browsers> <browser refID="Default"> <capabilities><!-- To avoid wrong detections of e.g. IE10 --> <capability name="cookies" value="true" /> <capability name="ecmascriptversion" value="3.0" /> </capabilities> </browser> </browsers>
相关文章推荐
- asp.net mvc 中[Authorize]在IE9以上版本关于FormsAuthentication.SetAuthCookie无效的问题 解决方案
- MVC .NET的FormsAuthentication.SetAuthCookie在IE10中无效的问题
- asp.net 登陆验证 Form表单验证的3种方式 FormsAuthentication.SetAuthCookie;FormsAuthentication.RedirectFromLoginPage;FormsAuthenticationTicket
- FormsAuthentication.SetAuthCookie函数使用无效
- FormsAuthentication.SetAuthCookie函数使用无效
- 用 FormsAuthentication.SetAuthCookie 做权限验证
- asp.net 登陆验证 Form表单验证的3种方式 FormsAuthentication.SetAuthCookie;FormsAuthentication.RedirectFromLoginPage;FormsAuthenticationTicket
- asp.net 登陆验证 Form表单验证的3种方式 FormsAuthentication.SetAuthCookie;FormsAuthentication.RedirectFromLoginPage;FormsAuthenticationTicket
- asp.net 登陆验证 Form表单验证的3种方式 FormsAuthentication.SetAuthCookie;FormsAuthentication.RedirectFromLoginPage;FormsAuthenticationTicket
- Asp.net MVC Form认证,IIS改成集成模式后,FormsAuthentication.SetAuthCookie无效,Request.IsAuthenticated值,始终为false,页面提示HTTP 错误 401.0 - Unauthorized,您无权查看此目录或页面
- IE10下 FormsAuthentication.SetAuthCookie无效的问
- FormsAuthentication.SetAuthCookie
- FormsAuthentication.SetAuthCookie Method
- FormsAuthentication.SetAuthCookie
- FormsAuthentication.SetAuthCookie
- FormsAuthentication.SetAuthCookie
- FormsAuthentication.SetAuthCookie Method
- FormsAuthentication.SetAuthCookie是必须写的吗?
- FormsAuthentication.SetAuthCookie
- FormsAuthentication.SetAuthCookie