我想将custome
错误设置为true,以防止
用户查看有关我的应用程序的详细信息。但我找不到我应该写这个< customErrors mode =“on”> ;;应该是在web.con
fig还是在web,debug.con
fig还是在哪里? BR
根据我的经验,我们应该在发布模式下将
自定义错误切换为On,并在调试中将其
关闭。要
自动执行此操作,我们可以像下面的示例一样使用web.con
fig转换。
Web.Debug.config
此设置将允许Web服务器显示包含有用错误信息的ASP.NET黄页。
<customErrors mode="Off" xdt:Transform="Replace" />
Web.Release.config
另一方面,我们不希望用户知道技术错误。我们应该使用自定义错误页面而不是ASP.NET黄页。
<customErrors mode="On" xdt:Transform="Replace" />
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。