0

我的 ErrorsController 中有一个位于 Errors/Error 的错误页面。如果我创建一个错误,它会将我重定向到该页面。但是,我收到一封来自 Elmah 的错误电子邮件,其中说明了以下消息。即使我的错误页面显示正常,我也收到此消息是否有原因?

System.InvalidOperationException: The view 'Error' or its master was not found or no view engine supports the searched locations. The following locations were searched: ~/Views/divisions/Error.cshtml ~/Views/divisions/Error.vbhtml ~/Views/Shared/Error.cshtml ~/Views/Shared/Error.vbhtml

网络配置

   <customErrors mode="Off" defaultRedirect="~/Error">
          <error statusCode="404" redirect="~/PageNotFound" />
      </customErrors>
4

0 回答 0