這種錯誤一般是代碼存在問題,由於看不到具體錯誤,一臉懵逼,不知道怎麼解決
經過各種資料查找,得出要查看詳細錯誤,需要三個步驟配置:
在webconfig中設置
1.配置webconfig
<system.web><customErrors mode="Off"/></system.web>
<system.webServer>
<httpErrors errorMode="Detailed" existingResponse="PassThrough"></httpErrors>
</system.webServer>
2.修改啓動全部配置startup.cs 文件
// Here:
config.IncludeErrorDetailPolicy = IncludeErrorDetailPolicy.Always;
有錯誤顯示,什麼問題都不是事。