简体   繁体   English

Response.AppendToLog()在IIS7,Windows Server 2008中不附加任何内容

[英]Response.AppendToLog() doesn't append anything in IIS7, Windows Server 2008

I'm using Response.AppendToLog to log custom information to IIS Logs under the cs-uri-query field. 我正在使用Response.AppendToLog将自定义信息记录到cs-uri-query字段下的IIS日志中。 The logging is working fine on IIS6 but doesn't do anything on IIS7. 该日志记录在IIS6上运行良好,但在IIS7上却不执行任何操作。 Do I need to do anything more to get it to work on IIS7? 我需要做更多的事情才能使其在IIS7上运行吗?

The problem was due to incorrect configuration in Web Config for IIS7. 该问题是由于IIS7的Web Config中的配置不正确。 Moving the httpmodule section from system.web to system.webserver solved the logging issue. 将httpmodule部分从system.web移到system.webserver可以解决日志记录问题。

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

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