webconfig 文件中出现错误“This”那么标签应该有它的“模式”属性设置为“关闭”。
我在部署 asp.mvc 网站时遇到此错误。
运行时错误
描述:服务器上发生应用程序错误。此应用程序的当前自定义错误设置阻止远程查看应用程序错误的详细信息(出于安全原因)。但是,可以通过本地服务器计算机上运行的浏览器查看它。
详细信息:要在远程计算机上查看此特定错误消息的详细信息,请在位于当前 Web 应用程序根目录的“web.config”配置文件中创建一个标记。然后,该标签应将其“mode”属性设置为“Off”。
<configuration>
<system.web>
<customErrors mode="Off"/>
</system.web>
</configuration>
注意:通过修改应用程序配置标记的“defaultRedirect”属性以指向自定义错误页面 URL,可以将您看到的当前错误页面替换为自定义错误页面。
我缺少什么?
<configuration>
<system.web>
<customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/>
</system.web>
</configuration>
I got this Error while i deployed asp.mvc website.
Runtime Error
Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.
Details: To enable the details of this specific error message to be viewable on remote machines, please create a tag within a "web.config" configuration file located in the root directory of the current web application. This tag should then have its "mode" attribute set to "Off".
<configuration>
<system.web>
<customErrors mode="Off"/>
</system.web>
</configuration>
Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's configuration tag to point to a custom error page URL.
What i am missing?
<configuration>
<system.web>
<customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/>
</system.web>
</configuration>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
检查您的应用程序 DLL 是否位于服务器上的正确位置。
Check your application DLL is in the right place on the server.
这是一个迟来的答案,仅供记录:
此错误意味着您的应用程序已崩溃,但 IIS 服务器无法向您显示确切的错误,因为
customErrors
不是'Off'
。要了解错误,您可以通过在服务器浏览器 (localhost) 上浏览来重新创建错误,也可以执行
。This is a late answer, just for the record:
this error means that your application has crashed but the IIS server cannot show you the exact error because
customErrors
isn't'Off'
.to know about the error you can either recreate the error by browsing on your server's browser (localhost), or you can do
<customErrors mode="Off" />
.