HTTP 错误 401.0

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>

  

原文地址:https://www.cnblogs.com/amywechat/p/5594154.html