【发布时间】:2013-04-11 21:45:28
【问题描述】:
我正在尝试使网站符合 pci。
如果您访问(虚拟 ip): http:someipaddress/ZNYTMHXO.ashx
然后用户正确地看到我在我的网络配置中声明的页面中的 html:
但是,如果您使用相同的 url,但在查询字符串中使用 ?aspxerrorpath=/: http:someipaddress/ZNYTMHXO.ashx?aspxerrorpath=/
然后页面显示“/”应用程序中的服务器错误。运行时错误。
pci 扫描失败。
为什么这个变量会导致问题?
对不起,我应该声明 ZNYTMHXO.ashx 不存在。当 asperrorpath 不在查询字符串中时,404 重定向有效。
-----更新----- 只是为了帮助,这是显示页面的 html,非常有限。
<!DOCTYPE html>
<html>
<head>
<title>Runtime Error</title>
<meta name="viewport" content="width=device-width" />
<style>
body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;}
p {font-family:"Verdana";font-weight:normal;color:black;margin-top: -5px}
b {font-family:"Verdana";font-weight:bold;color:black;margin-top: -5px}
H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red }
H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon }
pre {font-family:"Consolas","Lucida Console",Monospace;font-size:11pt;margin:0;padding:0.5em;line-height:14pt}
.marker {font-weight: bold; color: black;text-decoration: none;}
.version {color: gray;}
.error {margin-bottom: 10px;}
.expandable { text-decoration:underline; font-weight:bold; color:navy; cursor:hand; }
@media screen and (max-width: 639px) {
pre { width: 440px; overflow: auto; white-space: pre-wrap; word-wrap: break-word; }
}
@media screen and (max-width: 479px) {
pre { width: 280px; }
}
</style>
</head>
<body bgcolor="white">
<span><H1>Server Error in '/' Application.<hr width=100% size=1 color=silver></H1>
<h2> <i>Runtime Error</i> </h2></span>
<font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif ">
<b> Description: </b>An exception occurred while processing your request. Additionally, another exception occurred while executing the custom error page for the first exception. The request has been terminated.
<br><br>
</body>
</html>
【问题讨论】:
-
Server Error in '/' Application消息中应该有其他信息——也许是Description和/或Compiler Error Message或Source Error? -
刚刚把html加到上面...
-
了解错误页面输出的关键在于
Description。它说“处理您的请求时发生异常。此外,在执行第一个异常的自定义错误页面时发生另一个异常。请求已终止。”当您的错误处理本身在处理另一个错误时发生错误时,就会发生这种不太有趣的情况。不过,请查看我发布的答案——我认为您可以在这里找到通过 PCI 合规性测试所需进行的纠正。
标签: asp.net custom-error-pages