HTTP 错误 401.0 - Unauthorized 的解决方案

1、安装vs2015后,以前做的项目中Forms身份验证,竟然不能使用了

  

2、打开当前项目属性,将windows身份验证属性改为启用

  

3、vs2015生成的mvc项目中,webconfig缺失authentication节点,补上

  <system.web>
    <compilation debug="true" targetFramework="4.5" />
    <httpRuntime targetFramework="4.5" />
    <authentication mode="Forms">
      <forms loginUrl="~/Account/Login" timeout="2880" />
    </authentication>
  </system.web>

  

posted @ 2016-06-17 15:27  荒古禁地  阅读(23532)  评论(0编辑  收藏  举报