How to parse log file in asp.net?
This is log file data.
112.11.29.190 - - [20/Mar/2011:07:52:00 +0000] "GET /c604436.r36.ran.com/Trans_14V.flv HTTP/1.1" 200 551762 "-" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Trident/4.0; GTB7.0; .NE开发者_Go百科T CLR 1.1.422; .NET CLR 2.0.507; .NET CLR 3.0.0450.30; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; InfoPath.1; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET4.0C; .NET4.0E)" 110.19.20.12 - - [20/Mar/2011:07:33:00 +0000] "GET /c604436.r36.ran.com/Formers_12V.flv HTTP/1.1" 200 5517862 "-" "Mozilla/5.0 (compatible; MSIE 8.0; Windows NT 4.1; Trident/4.0; GTB7.0; .NET CLR 1.1.432; .NET CLR 2.0.5072; .NET CLR 3.0.0450.30; .NET CLR 3.0.0450.648; .NET CLR 3.5.2122; InfoPath.1; .NET CLR 3.0.456.2152; .NET CLR 3.5.3029; .NET4.0C; .NET4.0E)"
i just want to know the details about the logfile as follow
ip :112.11.29.190, Date :20/Jun/2011:07:52:00, Browser :Mozilla/4.0.....
How to parse server log file ?
You can Log Parser, below might help:
http://support.microsoft.com/kb/910447
https://web.archive.org/web/20210619173601/https://www.4guysfromrolla.com/articles/051802-1.aspx
Log parser is certainly an option. You might also consider just using LINQ:
http://www.developerfusion.com/article/84468/linq-to-log-files/
精彩评论