fail: Microsoft.AspNetCore.Mvc.ViewFeatures.ViewResultExecutor[3]
The view 'Index' was not found. Searched locations: /Areas/AAA/Views/XXX/Index.cshtml, /Areas/AAA/Views/Shared/Index.cshtml, /Views/Shared/Index.cshtml
fail: Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware[1]
An unhandled exception has occurred while executing the request.
System.InvalidOperationException: The view 'Index' was not found. The following locations were searched:
/Areas/AAA/Views/XXX/Index.cshtml
/Areas/AAA/Views/Shared/Index.cshtml
/Views/Shared/Index.cshtml
开发环境一切正常,发布到服务器上出现上述错误,找不到视图文件,可视图文件明明就存在。
尝试新建一个文件,将 Index.cshtml 文件的内容拷贝到新文件中保存,删除原文件,将新文件改名为 Index.cshtml,发布,OK。
vs-iis-express-ssl-port
roll-back-to-mysql-connector-net-8-0-19
The-view-was-not-found
FromSqlRaw
csharp-substring