每次将Web应用程序上载到提供程序时,都会出现错误。由于有customErrors模式,因此我看到的只是默认的“运行时错误”消息,指示我关闭customErrors以查看有关该错误的更多信息。
激怒了,我将我的web.config设置如下:
<?xml version="1.0"?>
<configuration>
<system.web>
<customErrors mode="Off"/>
</system.web>
</configuration>
而且,我得到的只是愚蠢的远程错误页面,上面没有有用的信息。我还能做些什么来关闭customErrors?!
@Model.Exception.Message
到Shared/Error.cshtml