如何通过 ISAPI 过滤器向 IIS 日志文件添加额外信息?
我正在编写一个提供身份验证服务的 ISAPI 过滤器。我想确保我允许通过的任何请求都会在 IIS 日志文件中记录一些附加信息。这将包括登录用户的详细信息,以便以后生成统计数据。
在 Apache 中,我通过在请求中添加一个名为“注释”并配置日志格式以在日志文件中包含我的注释来完成此操作。
有什么办法可以在 IIS 中完成同样的事情吗?我知道支持将 cookie 值写入日志文件,但我宁愿编写一些更自定义的内容。
欢迎提出巧妙的想法...
I am writing an ISAPI filter which provides authentication services. I would like to ensure that any requests I allow through have some additional information logged in the IIS logfile. This will include details on the logged in user to allow later stats generation.
In Apache, I have accomplished this by adding a named "note" the the request, and configuring the log format to include my note in the logfile.
Is there any way I could accomplish the same thing in IIS? I know there is support for writing the cookie value to the logfile, but I'd rather write something more customised.
Cunning ideas welcome...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我想您可能已经遇到过这个,但无论如何,可以 这有帮助吗?
I guess you may have came across this, but anyway, could this help?