简体   繁体   English

IIS7 上的经典 ASP:拒绝在 500 Internal Server Error 上向浏览器发送错误

[英]Classic ASP on IIS7: refusing to send errors to browser on 500 Internal Server Error

I have classic ASP running on IIS 7.我在 IIS 7 上运行经典 ASP。

Even though I configured the ASP "Debugging Properties" to "Send Errors to Browser = True", the web app REFUSES to send errors to the browser and continues to send a 500 internal server error.即使我将 ASP“调试属性”配置为“向浏览器发送错误 = True”,Web 应用程序拒绝向浏览器发送错误并继续发送 500 内部服务器错误。

  • My browser has "Show Friendly HTTP Error Messages" unchecked.我的浏览器未选中“显示友好的 HTTP 错误消息”。
  • Failed Request Tracing is installed (not sure if that's related)已安装失败的请求跟踪(不确定是否相关)
  • Happens both on web pages loaded locally on the server and remotely发生在服务器本地和远程加载的网页上
  • The App Pool is integrated (not sure if that matters)应用程序池已集成(不确定是否重要)

Any ideas?有任何想法吗?

尝试:Internet信息服务(IIS)管理器- >默认网站- >单击错误页面属性,然后选择详细信息错误

I was having the same issue with a Classic ASP app running in a subfolder of a site. 我在网站的子文件夹中运行的经典ASP应用程序遇到了同样的问题。 I had enabled detailed errors and the 500 was still showing. 我已经启用了详细的错误,500仍在显示。 My resolution was to enable parent paths in the ASP section in IIS for the site as the application was referencing the parent folder using "../": 我的解决方案是在IIS中为站点启用ASP部分中的父路径,因为应用程序使用“../”引用父文件夹:

经典ASP的CEnable父路径 -  IIS

I had this occuring on a Classic ASP application running in a subfolder of a site. 我在一个运行在站点的子文件夹中的Classic ASP应用程序中发生了这种情况。 The solution was: 解决方案是:

IIS > Click into your Site > Click into your Application folder > Error Pages > Edit Feature Settings > set to: Detailed Errors

IIS Manager >> double click the ASP icon to open the ASP page. IIS管理器>>双击ASP图标以打开ASP页面。 Expand the Debugging Properties node and set Send Errors To Browser to True . 展开“调试属性”节点,并将“将错误发送到浏览器”设置为True

在此输入图像描述

在此输入图像描述

Refer : http://www.chestysoft.com/asp-error-messages.asp 请参阅: http//www.chestysoft.com/asp-error-messages.asp

If you are hosting the project in a shared environment then you can use the following snippet to view the errors. 如果您在共享环境中托管项目,则可以使用以下代码段来查看错误。

<configuration>
<system.webServer>
    <httpErrors errorMode="Detailed" />
</system.webServer>
<system.web>
    <customErrors mode="Off" />
    <compilation debug="true" />
</system.web>

Refer this URL for complete information http://blogs.iis.net/rickbarber/working-past-500-internal-server-error 有关完整信息,请参阅此URL http://blogs.iis.net/rickbarber/working-past-500-internal-server-error

Hope it helps someone 希望它可以帮助某人

If your website is configured to connect to the physical path of the website as a specific user, instaed of using pass-through authentication, you may get this error if there is a permissions error with this user. 如果您的网站配置为以特定用户身份连接到网站的物理路径,并且使用传递身份验证,则如果此用户存在权限错误,则可能会出现此错误。 It may also be necessary to restart the Windows Process Activation Service and then restart IIS. 可能还需要重新启动Windows进程激活服务,然后重新启动IIS。

I had a 500 error with an ASP Classic application I had just installed on a new server (Windows 2019).我刚刚在新服务器(Windows 2019)上安装的 ASP Classic 应用程序出现 500 错误。 Every URL on the application returned 500, no matter what.无论如何,应用程序上的每个 URL 都返回 500。 But no errors were being shown in the Windows event log, and despite configuring detailed errors, as mentioned in several the other answers here, no specific error was being displayed in the browser.但是 Windows 事件日志中没有显示任何错误,尽管配置了详细的错误,正如这里的其他几个答案中提到的那样,浏览器中没有显示特定的错误。

The only clue was in the IIS logs, which showed the HTTP status code as 500, and the IIS substatus code as 19. So a 500.19 error.唯一的线索是在 IIS 日志中,它显示 HTTP 状态代码为 500,而 IIS 子状态代码为 19。所以是 500.19 错误。

That led me to and the specific issue I was having was answered by the second part of this section:这导致了我,本节的第二部分回答了我遇到的具体问题:

https://docs.microsoft.com/en-us/troubleshoot/iis/http-error-500-19-webpage#hresult-code-0x80070005 https://docs.microsoft.com/en-us/troubleshoot/iis/http-error-500-19-webpage#hresult-code-0x80070005

which says:其中说:

Don't configure the website to use UNC pass-through authentication to access the remote UNC share.不要将网站配置为使用 UNC 直通身份验证来访问远程 UNC 共享。 Instead, specify a user account that has the appropriate permissions to access the remote UNC share.相反,请指定具有访问远程 UNC 共享的适当权限的用户帐户。

and (this is the part I needed to do):和(这是我需要做的部分):

Grant the Read permission to the IIS_IUSRS group for the ApplicationHost.config or Web.config file.向 IIS_IUSRS 组授予 ApplicationHost.config 或 Web.config 文件的读取权限。 To do it, follow these steps:为此,请按照下列步骤操作:

In Windows Explorer, locate the folder that contains the ApplicationHost.config file that is associated with the website, or locate the virtual directories or the application directories that contain the Web.config file that is associated with the website.在 Windows 资源管理器中,找到包含与网站关联的 ApplicationHost.config 文件的文件夹,或者找到包含与网站关联的 Web.config 文件的虚拟目录或应用程序目录。

Note笔记

The Web.config file may not be in the virtual directories or the application directories in IIS. Web.config 文件可能不在 IIS 中的虚拟目录或应用程序目录中。 Even in this situation, you have to follow these steps.即使在这种情况下,您也必须遵循这些步骤。

Right-click the folder that contains the ApplicationHost.config file, or right-click the virtual or application directories that may contain the Web.config file.右键单击包含 ApplicationHost.config 文件的文件夹,或右键单击可能包含 Web.config 文件的虚拟目录或应用程序目录。

Select Properties.选择属性。

Select the Security tab, and then Select Edit.选择安全选项卡,然后选择编辑。

Select Add.选择添加。

In the Enter the object names to select box, type \\IIS_IUSRS, select Check Names, and then select OK.在“输入要选择的对象名称”框中,键入 \\IIS_IUSRS,选择“检查名称”,然后选择“确定”。

Note笔记

is a placeholder for the computer name.是计算机名称的占位符。

Select the Read check box, and then select OK.选中读取复选框,然后选择确定。

In the Properties dialog box for the folder, select OK.在文件夹的“属性”对话框中,选择“确定”。

Note笔记

Make sure that the folder properties are inherited by the ApplicationHost.config and Web.config files so that IIS_IUSRS has the Read permission for those files.确保文件夹属性由 ApplicationHost.config 和 Web.config 文件继承,以便 IIS_IUSRS 对这些文件具有读取权限。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM