启用经典asp站点的日志记录 [英] Enable logging for a classic asp site
问题描述
我可以访问该网站,但是在某些时候我得到一个通用的500错误页面。我想知道发生了什么,所以我认为最好的是查看日志
- 在c:\WINDOWS中找不到任何内容\system32\LogFiles\或c:\inetpub\logs\
- 尝试启用日志记录如下: https://technet.microsoft.com/en-us/library/cc732826(v = ws.10) .aspx 但我没有记录图标/按钮(见截图)。
- 尝试自定义错误500页,如下所示: http://www.iis.net/configreference/system.webserver/httperrors/error ,但没有错误页面图标(见截图)
- 尝试使用web.config自定义500页,如下所示: http://blogs.iis.net/rickbarber/arc hive / 2013/02/18 / work-past-500-internal-server-error.aspx ,但似乎忽略了
记录,我是一个新手与IIS / ASP所以这个问题可以听起来有点傻..
感谢任何建议!
您应该在IIS中安装HTTP错误功能。这足以查看错误信息 - 您不需要登录。
- 转到程序和功能控制面板。 li>
- 选择打开或关闭Windows功能
- 向下浏览Internet信息服务> Word Wide Web Services>常用HTTP功能,然后选择HTTP错误 (当您使用此功能时,您可以通过深入到Internet信息服务> Word Wide Web Services>运行状况和诊断程序并选择HTTP日志记录来安装日志功能。)
- 单击确定安装。
安装后,配置IIS显示详细的错误消息:
- 在您的网站的IIS设置中,您应该会看到一个错误页面选项。双击它。
- 单击编辑功能设置。
- 选择详细错误或本地请求的详细错误...,具体取决于关于您是否正在进行本地开发。
- 在您的站点的IIS设置中,双击ASP选项。
- 展开调试属性并将发送错误到浏览器设置为true。
您现在应该可以看到详细的错误消息。
IIS日志不会帮助您,因为它们不包含详细的错误消息。
I inherited a classic ASP project and and have deployed it on a IIS 7.5. I am able to access the site, however at certain point I get a generic 500 error page. I want to know what is going on, so I think the best is to see the logs
- Have found nothing in c:\WINDOWS\system32\LogFiles\ nor c:\inetpub\logs\
- Tried to enable logging as here: https://technet.microsoft.com/en-us/library/cc732826(v=ws.10).aspx But I have no Logging icon/button there (see screenshot).
- Tries custom error 500 page as here: http://www.iis.net/configreference/system.webserver/httperrors/error but there's no "Error Pages" icon (see screenshot)
- Tried to custom 500 page with web.config as here: http://blogs.iis.net/rickbarber/archive/2013/02/18/working-past-500-internal-server-error.aspx but seems that it gets ignored
For the record, I am a newbie with IIS/ASP so the question can sound a bit silly.. Thanks for any suggestion!
You should install the HTTP Errors feature in IIS. This is enough to view the error message -- you won't need logging.
- Go to the Programs and Features control panel.
- Select "Turn Windows features on or off"
- Drill down to Internet Information Services > Word Wide Web Services > Common HTTP Features and select "HTTP Errors" (While you're at it, you can install the logging feature by drilling down to Internet Information Services > Word Wide Web Services > Health and Diagnostics and selecting "HTTP Logging".)
- Click OK to install.
Once installed, configure IIS to show detailed error messages:
- In the IIS settings for your site you should now see an Error Pages option. Double-click it.
- Click Edit Feature Settings.
- Select either "Detailed errors" or "Detailed errors for local requests..." depending on whether you are doing local development or not.
- In the IIS settings for your site, double-click the ASP option.
- Expand Debugging Properties and set "Send Errors To Browser" to true.
You should now see detailed error messages.
IIS logs won't help you because they do not include the detailed error messages.
这篇关于启用经典asp站点的日志记录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!