ASP.NET MVC項目由於Form表單未認證導致登錄頁css樣式無法使用(302錯誤)

具體問題就是未登錄認證,登錄界面引用的css樣式和js文件均報302錯誤;

找了很久的問題終於定位在配置文件上;

具體的解決方法就是在configuration節點下,system.web節點後面添加location節點,Content是我的項目資源路徑,大家根據實際更改爲自己的資源路徑即可。


<configuration>
    <system.web>
    .
    .
    </system.web>
    <location path="Content">
        <system.web>
            <authorization>
                <allow users="*"/>
            </authorization>
        </system.web>
    </location>
</configuration>

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章