简体   繁体   English

当映射为通过asp.net引擎处理所有请求时,IIS6日志文件将块报告为pdf文件的已完成下载

[英]IIS6 log file reporting chunks as completed downloads for pdf files when mapped to process all request through the asp.net engine

On a Windows 2003 SP2 server with IIS 6, we configured IIS to process all request through the ASP.NET engine using aspnet_isapi.dll as outlined here http://professionalaspnet.com/archive/2007/07/27/Configure-IIS-for-Wildcard-Extensions-in-ASP.NET.aspx After the change, we noticed a huge increase in hits for pdf files. 在具有IIS 6的Windows 2003 SP2服务器上,我们将IIS配置为使用aspnet_isapi.dll通过ASP.NET引擎处理所有请求,如此处所述http://professionalaspnet.com/archive/2007/07/27/Configure-IIS- for-Wildcard-Extensions-in-ASP.NET.aspx更改后,我们发现pdf文件的点击量大幅增加。

For example, before we made the change, a 7Mb file was "hit" 78 times in a day as indicated by an HTTP status of 200 . 例如,在我们进行更改之前,7Mb文件在一天内被“击中”78次,如HTTP状态200所示。 After the change, that same file reported 22,000 "hits" in a single day. 更改后,该文件在一天内报告了22,000次“点击”。

In looking at the logs, it seems that the http status of 200 is being returned on every chunk, instead of for a completed download. 在查看日志时,似乎每个块都返回了http状态200,而不是完成下载。 This is an extract from the log file before the change 这是更改前日志文件的摘录

cs-method sc-status sc-substatus    sc-win32-status sc-bytes
GET       200   0       0       7452463     
HEAD      200   0       0       259         
GET       200   0       0       7452463     
HEAD      200   0       0       259

the first and second line represent a request from one ip address, the third and fourth are from a second IP address 第一行和第二行表示来自一个IP地址的请求,第三行和第四行来自第二IP地址

and here is a similar extract from a log file created after we made the change 这是从我们进行更改后创建的日志文件中提取的类似内容

cs-method   sc-status  sc-substatus sc-win32-status sc-bytes
GET     200     0       0       7379092 
GET     200     0       0       102331  
GET     200     0       0       4249
GET     200     0       0       4212
GET     200     0       0       4521
GET     200     0       0       477
GET     200     0       0       4521
GET     200     0       64      196608
GET     200     0       0       6740403

The first request is from one IP Address, while the remaining lines are from a second IP address. 第一个请求来自一个IP地址,而其余行来自第二个IP地址。

My question is this. 我的问题是这个。 Is there a way for me to cause the download of a pdf file to be recorded as a single hit, as it seemed to before I made the change? 有没有办法让我将pdf文件的下载记录为单击,就像我做出改变之前的那样?

It seems to me that the log is logging the actual requests, and it's the client's browser which decided to split it into chucks for more efficient downloading. 在我看来,日志记录了实际的请求,并且客户端的浏览器决定将其拆分为chucks以便更有效地下载。

If the purpose of this project is for reporting, I would recommend creating a parser app/service to count PDF hits by IP address within a certain timeframe, rather than trying to hack the logging mechanism. 如果此项目的目的是用于报告,我建议创建一个解析器应用程序/服务,以便在特定时间范围内按IP地址计算PDF命中数,而不是尝试破解日志记录机制。

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

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