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>

  


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM