ASP 页面是一个包含服务器端脚本的 HTML 页面,此脚本将由 Web 服务器进行处理之后发送到用户浏览器。当浏览器从 Web 服务器请求 .asp 文件时,服务器端脚本将会运行。Web 服务器将调用 ASP,然后从上至下处理请求的文件并执行任何脚本命令。再将文件转换为标准的 Web 页面并将其发送到浏览器。
更正 ASP 应用程序
如果 ASP 应用程序发生错误,可能的解决方法包括:
如果你从第三方供应商购买了此应用程序,请联系供应商更正错误。供应商应掌握更多具体的应用程序功能和特性。
请参阅 ASP 疑难解答提示和技巧一文。
检查事件日志消息以查看消息中包含的特定错误号。此错误号将不同于事件 ID。要执行此操作,请查看以下步骤。
检查事件日志消息中的特定错误号
若要检查事件日志消息中的特定错误号,请执行以下操作:
在“事件查看器”中,选择你收到的事件。
在“常规”选项卡中,查找事件消息中的错误号。下面是包含错误号的一个事件日志消息示例:
警告:ASP:无法对文件 - \\WEBSITES\MYWEBSITE\DEFAULT.ASP 进行 UNC 访问,错误为 = -2147024829。
查找有关特定错误号的详细信息
若要了解有关特定错误号的详细信息,请执行以下操作:
从 Microsoft Exchange Server 错误代码查找页面下载 Err.exe 实用工具。
打开提升的命令提示符窗口。单击“开始”,指向“所有程序”,再单击“附件”,右键单击“命令提示符”,然后单击“以管理员身份运行”。
在命令提示符处,导航到你下载 Err.exe 的目录。例如,如果已将 Err.exe 下载到 C:\Err,则键入 cd C:\Err。
键入错误号以获取有关此错误的详细信息。例如,如果错误号如上例所示为 -2147024829,则键入 err -2147024829。
在列举的示例中,错误解析为“找不到网络名称”,这可能意味着输入了错误的计算机名、UNC 路径中的计算机出现故障或者 WINS 出现问题。
Target | Microsoft.Windows.InternetInformationServices.10.0.WebServer |
Category | Alert |
Enabled | True |
Event Source | Active Server Pages |
Alert Generate | False |
Remotable | True |
Event Log | Application |
ID | Module Type | TypeId | RunAs |
---|---|---|---|
DS | DataSource | Microsoft.Windows.EventProvider | Default |
WA | WriteAction | Microsoft.Windows.Server.IIS.10.0.GenerateAlertAction.SuppressedByDescription | Default |
<Rule ID="Microsoft.Windows.InternetInformationServices.10.0.ASP.application.error.occured" Enabled="true" Target="Microsoft.Windows.InternetInformationServices.10.0.WebServer" ConfirmDelivery="false" Remotable="true" Priority="Normal" DiscardLevel="100">
<Category>Alert</Category>
<DataSources>
<DataSource ID="DS" TypeID="Windows!Microsoft.Windows.EventProvider">
<ComputerName>$Target/Host/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$</ComputerName>
<LogName>Application</LogName>
<Expression>
<And>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="String">PublisherName</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="String">Active Server Pages</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
<Expression>
<RegExExpression>
<ValueExpression>
<XPathQuery>EventDisplayNumber</XPathQuery>
</ValueExpression>
<Operator>MatchesRegularExpression</Operator>
<Pattern>^(500|499|23|22|21|20|19|18|17|16|9|8|7|6|5)$</Pattern>
</RegExExpression>
</Expression>
</And>
</Expression>
</DataSource>
</DataSources>
<WriteActions>
<WriteAction ID="WA" TypeID="Microsoft.Windows.Server.IIS.10.0.GenerateAlertAction.SuppressedByDescription">
<Priority>1</Priority>
<Severity>1</Severity>
<AlertMessageId>$MPElement[Name="Microsoft.Windows.InternetInformationServices.10.0.ASP.application.error.occured.AlertMessage"]$</AlertMessageId>
</WriteAction>
</WriteActions>
</Rule>