了解 IIS 7 日志文件 [英] Understanding IIS 7 log files

查看:15
本文介绍了了解 IIS 7 日志文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用 jQuery AJAX 帖子调试 ASP.NET 4.0 网站中发生的 405 错误,我从 IIS 日志文件中得到以下信息.

2012-07-02 15:15:37 XXX.XX.XX.XXX POST/AjaxWebMethods.aspx/TestWebMethod - 443 - XXX.XX.XX.XXMozilla/5.0+(Windows+NT+5.1;+rv:13.0)+Gecko/20100101+Firefox/13.0.1 405 0 0 218

我的问题:日志末尾的 405 0 0 218 表示什么?我假设 405 部分是客户端错误编号,但剩下的 3 个数字是多少?

解决方案

查看日志文件的顶部,您会看到如下内容:

<前>#Software:Microsoft Internet Information Services 7.5#版本:1.0#日期:2011-04-13 19:02:34#Fields:日期时间s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs(User-Agent) sc-status sc-substatus sc-win32-status time-taken

#Fields 行会告诉您每个值代表什么.在您的情况下,并假设您使用默认日志设置运行,则值为:

<前>sc-status sc-substatus sc-win32status 耗时====================================================405 0 0 218

  • sc-status - 是 HTTP 状态码的主要部分
  • sc-substatus - 是子状态,例如对于 503.19 HTTP 状态,它将是 19 部分
  • sc-win32status - 是一个 Windows 系统错误代码
  • time-taken - 以毫秒为单位发送响应所花费的时间

如果您获得 sc-win32status 的非零值,您可以使用:

NET HELPMSG

...找出状态代码映射到.

如果某个字段在日志文件中没有值,则缺少的值将显示为连字符 -.

I'm trying to debug a 405 error that is occurring in an ASP.NET 4.0 website with a jQuery AJAX post, and I've got the following from an IIS log file.

2012-07-02 15:15:37 XXX.XX.XX.XXX POST /AjaxWebMethods.aspx/TestWebMethod - 443 - XXX.XX.XX.XX Mozilla/5.0+(Windows+NT+5.1;+rv:13.0)+Gecko/20100101+Firefox/13.0.1 405 0 0 218

My question: what does the 405 0 0 218 at the end of the log signify? I'm assuming that the 405 portion is the client error number, but what are the 3 remaining numbers?

解决方案

Take a look at the top of your log file and you'll see something like this:

#Software: Microsoft Internet Information Services 7.5
#Version: 1.0
#Date: 2011-04-13 19:02:34
#Fields: date time s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs(User-Agent) sc-status sc-substatus sc-win32-status time-taken

The #Fields row will tell you what each value represents. In your case, and presuming you're running with the default log settings, the values would be:

sc-status  sc-substatus   sc-win32status  time-taken
====================================================
405        0              0               218

  • sc-status - is the major part of the HTTP status code
  • sc-substatus - is the sub status e.g. for a 503.19 HTTP status it would be the 19 part
  • sc-win32status - is a Windows system error code
  • time-taken - is the time taken to send the response in milliseconds

If you're getting non-zero values for sc-win32status you can use:

NET HELPMSG <sc-win32status value>

...to find out that that status code maps to.

If a field doesn't have a value in the log file then the missing value is shown as a hyphen -.

这篇关于了解 IIS 7 日志文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆