0

错误消息说明如下: HTTP Error 500.19 - Internal Server Error The requested page cannot be accessed because the related configuration data for the page is invalid.

为什么我的应用程序突然开始这样做?在我的 web.config 中,我定义了以下内容:

<customErrors mode="On" defaultRedirect="~/Error">
  <error redirect="~/Error/NotFound" statusCode="404"/>
</customErrors>

当我之前从 cshtml 文件构建解决方案时,这会将我重定向到自定义错误页面,而现在它只显示 IIS 8.0 详细错误页面。

当我说从 cshtml 文件构建时,我的意思是我执行了 ctrl+F5 并且我的浏览器会在http://localhost:54837/Views/UnitDetails/Wireline.cshtml. 这给了我自定义的 404 页面,但现在就像我说的,它只是给了我 IIS 8.0 详细错误页面。

希望有人可以指出错误源,因为这真的很烦人!:p

4

0 回答 0