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