任何人都知道如何使用LogParser查询获取SessionID / ASPNET_SESSIONID? 仅供参考,我查询的网站使用SSL。 目前,我的查询是
SELECT * FROM 'C:\inetpub\logs\LogFiles\W3SVC6\*.log' where cs-uri-stem like '%.doc' OR cs-uri-stem like '%.docx' AND date >= '2012-07-01'
这个怎么样:
SELECT EXTRACT_VALUE(REPLACE_str(cs(Cookie),';+','&'), 'ASP.NET_SessionId', '&') AS Cky, <other_column_names> FROM 'C:\inetpub\logs\LogFiles\W3SVC6\*.log' WHERE cs-uri-stem like '%.doc' OR cs-uri-stem LIKE'%.docx' AND date >= '2012-07-01'
与SQL不同,您必须明确指定您感兴趣的列,而不是添加*列通配符(即上面查询中的<other_column_names>占位符)。
您还需要确保IISconfiguration为在日志logging设置中loggingCookie(假设您使用的是W3C日志logging格式):
