<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:copyright="http://blogs.law.harvard.edu/tech/rss" xmlns:image="http://purl.org/rss/1.0/modules/image/">
    <channel>
        <title>IIS / Tools / Log Files</title>
        <link>http://blog.crowe.co.nz/category/18.aspx</link>
        <description>This section will include products both commerical and freeware that you can use to parse IIS log files.

There are a number of good products out there depending on what you need and I will include them here.
</description>
        <language>en-NZ</language>
        <copyright>Chris Crowe</copyright>
        <managingEditor>blog@crowe.co.nz</managingEditor>
        <generator>Subtext Version 1.9.4.0</generator>
        <item>
            <title>Google Analytics - Track page views and analyze the flow of visitors </title>
            <link>http://blog.crowe.co.nz/archive/2007/04/13/712.aspx</link>
            <description>&lt;P&gt;Google Analytics provides powerful tracking for anyone with a web presence, whether it be a small hobby website or a giant online enterprise. It's one of the most powerful web analytics solutions on the market - and it's free for anyone to use!&lt;/P&gt;
&lt;P&gt;Google Analytics provides in-depth reports for everyone involved in the running of a website, from the developers and designers to the marketing and management teams. Find out where people leave your site, and what content catches their attention. Compare marketing campaigns and see your return on investment for all of your AdWords spend. The ways that you can use Google Analytics are endless.&lt;/P&gt;
&lt;P&gt;This free version is limited to 5 million pageviews a month - however, users with an active Google AdWords account are given unlimited pageview tracking. In addition, Google Analytics is completely integrated into the AdWords front-end and with your AdWords campaign, making it easy to track your AdWords ROI.&lt;/P&gt;&lt;IMG src="/images/analytics.gif"&gt; 
&lt;P&gt;&lt;A href="http://www.google.com/analytics/"&gt;http://www.google.com/analytics/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;You can awatch a simple video here about how it works:&lt;BR&gt;&lt;A href="http://www.google.com/analytics/media/report_tour/feature_tour.html"&gt;http://www.google.com/analytics/media/report_tour/feature_tour.html&lt;/A&gt;&lt;/P&gt;&lt;img src="http://blog.crowe.co.nz/aggbug/712.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Chris Crowe</dc:creator>
            <guid>http://blog.crowe.co.nz/archive/2007/04/13/712.aspx</guid>
            <pubDate>Thu, 12 Apr 2007 16:12:00 GMT</pubDate>
            <comments>http://blog.crowe.co.nz/archive/2007/04/13/712.aspx#feedback</comments>
            <slash:comments>3</slash:comments>
            <wfw:commentRss>http://blog.crowe.co.nz/comments/commentRss/712.aspx</wfw:commentRss>
        </item>
        <item>
            <title>Microsoft releases a new download center for IIS (everything in one place)</title>
            <link>http://blog.crowe.co.nz/archive/2007/02/01/680.aspx</link>
            <description>&lt;IMG src="/images/IISDownloadCenter.gif" align=right&gt;
&lt;P&gt;&lt;SPAN lang=EN-US&gt;&lt;A href="http://www.iis.net/downloads/default.aspx?tabid=3" target=_blank&gt;DownloadCENTER&lt;/A&gt; for IIS.net has been released!&amp;nbsp;&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN lang=EN-US&gt;The &lt;A href="http://www.iis.net/downloads/default.aspx?tabid=3"&gt;DownloadCENTER at IIS.net&lt;/A&gt;, is a community hotspot for discovering, sharing, reviewing and promoting IIS-related solutions in a single place.&amp;nbsp; Dozens of existing downloads, for all versions of IIS &amp;#8211; both from Microsoft and the community &amp;#8211; are already available in DownloadCENTER today.&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN lang=EN-US&gt;This new feature of IIS.net is particularly relevant with the release of IIS7 in Windows Vista.&amp;nbsp; The latest release of Microsoft&amp;#8217;s Web server has a completely &lt;A href="http://www.iis.net/default.aspx?tabid=7&amp;amp;subtabid=71" target=_blank&gt;modular&lt;/A&gt; architecture which features over &lt;A href="http://www.iis.net/default.aspx?tabid=7&amp;amp;subtabid=74" target=_blank&gt;forty pluggable components&lt;/A&gt; that can be easily added, removed or even replaced with custom implementations.&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN lang=EN-US&gt;This powerful &lt;A href="http://www.iis.net/default.aspx?tabid=2&amp;amp;subtabid=25&amp;amp;i=1076" target=_blank&gt;extensibility&lt;/A&gt; support is available to both .NET and C/C++ developers.&amp;nbsp; In the future, DownloadCENTER is expected to house a large number of IIS7 extensions submitted by not only the IIS team but the developers and partner ISVs of the IIS community as well.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN lang=EN-US&gt;To learn more about the DownloadCenter, read IIS Product Unit Manager, Bill Staples&amp;#8217; &lt;A href="http://blogs.iis.net/bills/archive/2007/01/28/iis-net-downloadcenter-is-now-live.aspx"&gt;blog post&lt;/A&gt; about it or check it out yourself today!&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://blog.crowe.co.nz/aggbug/680.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Chris Crowe</dc:creator>
            <guid>http://blog.crowe.co.nz/archive/2007/02/01/680.aspx</guid>
            <pubDate>Wed, 31 Jan 2007 23:36:00 GMT</pubDate>
            <comments>http://blog.crowe.co.nz/archive/2007/02/01/680.aspx#feedback</comments>
            <wfw:commentRss>http://blog.crowe.co.nz/comments/commentRss/680.aspx</wfw:commentRss>
        </item>
        <item>
            <title>IIS 6 - Web Site Instance IDs - seemingly random but they are not!</title>
            <link>http://blog.crowe.co.nz/archive/2006/05/03/619.aspx</link>
            <description>&lt;P&gt;On IIS 6.0 you will find that when you create web sites that their log files are created with seemingly random numbers. In previous versions of IIS the Instance IDs as they are called were sequentially numbered.&lt;/P&gt;
&lt;P&gt;The first "Default Web Site" has a log file directory of W3SVC1 but any new sites you create may end up as follows (or something similar)&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;W3SVC1240841244&lt;/LI&gt;
&lt;LI&gt;W3SVC1289352529&lt;/LI&gt;
&lt;LI&gt;W3SVC147076792&lt;/LI&gt;
&lt;LI&gt;W3SVC1527186048&lt;/LI&gt;
&lt;LI&gt;W3SVC1566259604&lt;/LI&gt;
&lt;LI&gt;W3SVC1710104836&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;I have written a script that you can use to display all the web sites and their associated Instance Ids - the output similar to the following.&lt;/P&gt;
&lt;TABLE id=table1 style="BORDER-COLLAPSE: collapse" cellSpacing=0 cellPadding=5 bgColor=#ffffcc border=1&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD&gt;&lt;B&gt;Web Sites&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Description&lt;/B&gt;&lt;BR&gt;===============================================================&lt;BR&gt;W3SVC/1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Default Web Site&lt;BR&gt;W3SVC/1036328378 WebSite1&lt;BR&gt;W3SVC/1816184000 WebSite2&lt;BR&gt;W3SVC/1867813904 WebSite3&lt;BR&gt;W3SVC/568530179&amp;nbsp;&amp;nbsp; WebSite4&lt;BR&gt;W3SVC/719499532&amp;nbsp;&amp;nbsp; WebSite5&lt;BR&gt;W3SVC/669732006&amp;nbsp;&amp;nbsp; WebSite6&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;
&lt;P&gt;See &lt;A href="http://blog.crowe.co.nz/archive/2005/12/08/346.aspx"&gt;http://blog.crowe.co.nz/archive/2005/12/08/346.aspx&lt;/A&gt; for the script.&lt;/P&gt;
&lt;P&gt;Something I only learned recently was that the Instance Ids can be made sequential again by editing the registry and they are not random at all.&lt;/P&gt;
&lt;H3&gt;Changing the behaviour to the same as previous IIS versions&lt;/H3&gt;
&lt;P&gt;&lt;B&gt;Remember&lt;/B&gt; : Editing the registry is a risk you take on your own shoulders.&lt;/P&gt;
&lt;P&gt;To do this: &lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Click &lt;B&gt;Start&lt;/B&gt;, click &lt;B&gt;Run&lt;/B&gt;. In the &lt;B&gt;Open &lt;/B&gt;box, type &lt;B&gt;regedit&lt;/B&gt;, and then click &lt;B&gt;OK&lt;/B&gt;.&lt;/LI&gt;
&lt;LI&gt;In Registry Editor, locate the following key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\InetMgr\Parameters&lt;/LI&gt;
&lt;LI&gt;Click the &lt;B&gt;Parameters&lt;/B&gt; key. On the Edit menu, click &lt;B&gt;New Dword Value&lt;/B&gt;.&lt;/LI&gt;
&lt;LI&gt;Type &lt;B&gt;IncrementalSiteIDCreation&lt;/B&gt; for the name.&lt;/LI&gt;
&lt;LI&gt;Double-click the name of the new value.&lt;/LI&gt;
&lt;LI&gt;Change &lt;B&gt;Value Data&lt;/B&gt; to 1, and then click &lt;B&gt;OK&lt;/B&gt;.&lt;/LI&gt;
&lt;LI&gt;To enable the change, restart the IIS services. &lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;&lt;B&gt;Note: &lt;/B&gt;When you remotely administer another IIS server, the value of the registry key of the local server is used to determine how the site identification number is generated on the remote server.&lt;/P&gt;
&lt;H3&gt;Why was it changed?&lt;/H3&gt;
&lt;P&gt;The reason that Instance ID were changed was that if you are running a Web Farm with multiple physical IIS servers and create a web site on each server with the same description all of the web sites will have the same Instance ID.&lt;/P&gt;
&lt;P&gt;Basically if you create a new web site in IIS 6 and then delete the web site and create it again it will be created with the same Instance ID. So if you have multiple physical web servers for a particular web application you can read the log files from the same W3SVCx where x is the instance ID.&lt;/P&gt;
&lt;P&gt;I created a web site with a description of &lt;B&gt;XYZ&lt;/B&gt; and it produced the Instance ID of &lt;B&gt;906768&lt;/B&gt; so my log file directory ended up as &lt;B&gt;W3SVC906768&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;I then deleted this web site and the associated Log File Directory and repeated the exercise.&lt;/P&gt;
&lt;P&gt;It indeed did create the same Instance ID of &lt;B&gt;90768&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;The following table shows some descriptions and Instance IDs&lt;/P&gt;
&lt;TABLE id=table2 style="BORDER-COLLAPSE: collapse" cellSpacing=0 cellPadding=5 bgColor=#ffffcc border=1&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD&gt;&lt;B&gt;Description&lt;/B&gt;&lt;/TD&gt;
&lt;TD align=left&gt;&lt;B&gt;Instance ID&lt;/B&gt;&lt;/TD&gt;
&lt;TD align=left&gt;&lt;B&gt;Comment&lt;/B&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;A&lt;/TD&gt;
&lt;TD align=left&gt;66&lt;/TD&gt;
&lt;TD align=left&gt;ASCII character for B not A&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;B&lt;/TD&gt;
&lt;TD align=left&gt;67&lt;/TD&gt;
&lt;TD align=left&gt;ASCII character for C not B&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;AA&lt;/TD&gt;
&lt;TD align=left&gt;6631&lt;/TD&gt;
&lt;TD align=left&gt;No idea why 31 appears&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;AB&lt;/TD&gt;
&lt;TD align=left&gt;6632&lt;/TD&gt;
&lt;TD align=left&gt;No idea why 32 appears&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;AAA&lt;/TD&gt;
&lt;TD align=left&gt;669696&lt;/TD&gt;
&lt;TD align=left&gt;No idea why 96 appears&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://blog.crowe.co.nz/aggbug/619.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Chris Crowe</dc:creator>
            <guid>http://blog.crowe.co.nz/archive/2006/05/03/619.aspx</guid>
            <pubDate>Wed, 03 May 2006 11:27:00 GMT</pubDate>
            <comments>http://blog.crowe.co.nz/archive/2006/05/03/619.aspx#feedback</comments>
            <wfw:commentRss>http://blog.crowe.co.nz/comments/commentRss/619.aspx</wfw:commentRss>
        </item>
        <item>
            <title>ClustrMaps - Show a map of where you get your web site visitors....</title>
            <link>http://blog.crowe.co.nz/archive/2006/04/07/609.aspx</link>
            <description>&lt;P&gt;I came across an interesting site today &lt;A href="http://clustrmaps.com"&gt;http://clustrmaps.com&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;See at a glance &lt;I&gt;where&lt;/I&gt; your site's visitors are located: instantaneously, even when the numbers are enormous! &lt;EM&gt;Visitors don't need to click on anything: just viewing your page is sufficient.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;One thumbnail map on your site shows it all:&lt;/STRONG&gt; We provide (free) the HTML that gives you a thumbnail map, like the one on the left. When it loads, it increments a counter and shows the locations of &lt;I&gt;all&lt;/I&gt; the visitors to your page, cumulatively (even for huge numbers). Clicking on it &lt;STRONG&gt;zooms in&lt;/STRONG&gt; to a big world map, and (optionally) lets you zoom in to the continents, as in the example below.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;No hidden extras:&lt;/STRONG&gt; For light users (under 2500 visitors daily&amp;nbsp;- that is me) the service is free, forever, and stores &lt;I&gt;cumulative totals up to many hundreds of thousands of visitors&lt;/I&gt;. Paying users get &lt;A href="http://clustrmaps.com/products.htm"&gt;extra features&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&lt;IMG src="http://clustrmaps.com/stats/maps-clusters/blog.crowe.co.nz-world.jpg"&gt;&lt;/P&gt;&lt;img src="http://blog.crowe.co.nz/aggbug/609.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Chris Crowe</dc:creator>
            <guid>http://blog.crowe.co.nz/archive/2006/04/07/609.aspx</guid>
            <pubDate>Thu, 06 Apr 2006 23:59:00 GMT</pubDate>
            <comments>http://blog.crowe.co.nz/archive/2006/04/07/609.aspx#feedback</comments>
            <slash:comments>1</slash:comments>
            <wfw:commentRss>http://blog.crowe.co.nz/comments/commentRss/609.aspx</wfw:commentRss>
        </item>
        <item>
            <title>C# application to show the WWW and FTP Sites and their log file directories....</title>
            <link>http://blog.crowe.co.nz/archive/2006/02/22/574.aspx</link>
            <description>&lt;P&gt;I often look at the log files on my web server and with IIS 6 the folders are created with random numbers.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;Correction from Tom regarding the &amp;#8220;random numbers&amp;#8220;:&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"&gt;
&lt;P&gt;In fact the log file names are&amp;nbsp;generated from the site name so that in cases where a site is run on multiple servers the site id will be the same on each server. This helps with scripting and stuff. You can configure it in the registry to use the IIS5 type naming format if you want.&lt;/P&gt;
&lt;P&gt;More details can be found below:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Microsoft IIS Insider - February 2005&lt;BR&gt;&lt;A href="http://www.microsoft.com/technet/community/columns/insider/iisi0205.mspx#ECE"&gt;http://www.microsoft.com/technet/community/columns/insider/iisi0205.mspx#ECE&lt;/A&gt;&lt;BR&gt;&lt;BR&gt;&lt;/LI&gt;
&lt;LI&gt;Configure the Web Site Identification Number (IIS 6.0)&lt;BR&gt;&lt;A href="http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/fb7eb8d1-8862-497b-83d3-eee54a98a2de.mspx"&gt;http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/fb7eb8d1-8862-497b-83d3-eee54a98a2de.mspx&lt;/A&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;This simple application will display the WWW and FTP sites along with the log file directory. Just compile&lt;BR&gt;it up or download the executable and drop the executable into your c:\windows\system32\logfiles folder and&lt;BR&gt;just dblclick on it when you need to view the sites to folders relationships.&lt;/P&gt;
&lt;P&gt;
&lt;HR id=null&gt;

&lt;P&gt;&lt;/P&gt;&lt;IMG src="/images/iishelpdir.gif"&gt; 
&lt;HR id=null&gt;
&lt;PRE&gt;&lt;FONT color=blue&gt;using&lt;/FONT&gt; System;
&lt;FONT color=blue&gt;using&lt;/FONT&gt; System.DirectoryServices;
&lt;FONT color=blue&gt;using&lt;/FONT&gt; System.IO;
&lt;FONT color=blue&gt;using&lt;/FONT&gt; System.Collections;
&lt;FONT color=blue&gt;using&lt;/FONT&gt; System.Windows.Forms;
&lt;FONT color=blue&gt;namespace&lt;/FONT&gt; IISHelpDir
{
    &lt;FONT color=gray&gt;/// &lt;SUMMARY&gt;&lt;/FONT&gt;
    &lt;FONT color=gray&gt;/// Summary description for Class1.&lt;/FONT&gt;
    &lt;FONT color=gray&gt;/// &lt;/SUMMARY&gt;&lt;/FONT&gt;
    &lt;FONT color=blue&gt;class&lt;/FONT&gt; Class1
    {
        &lt;FONT color=gray&gt;/// &lt;SUMMARY&gt;&lt;/FONT&gt;
        &lt;FONT color=gray&gt;/// The main entry point for the application.&lt;/FONT&gt;
        &lt;FONT color=gray&gt;/// &lt;/SUMMARY&gt;&lt;/FONT&gt;
        [STAThread]
        &lt;FONT color=blue&gt;static&lt;/FONT&gt; &lt;FONT color=blue&gt;void&lt;/FONT&gt; Main(&lt;FONT color=blue&gt;string&lt;/FONT&gt;[] args)
        {
            SortedList www = &lt;FONT color=blue&gt;new&lt;/FONT&gt; SortedList();
            SortedList ftp = &lt;FONT color=blue&gt;new&lt;/FONT&gt; SortedList();
            &lt;FONT color=blue&gt;try&lt;/FONT&gt;
            {
                &lt;FONT color=blue&gt;const&lt;/FONT&gt; &lt;FONT color=blue&gt;string&lt;/FONT&gt; FtpServerSchema = &lt;FONT color=maroon&gt;"IIsFtpServer"&lt;/FONT&gt;; &lt;FONT color=green&gt;// Case Sensitive&lt;/FONT&gt;
                &lt;FONT color=blue&gt;const&lt;/FONT&gt; &lt;FONT color=blue&gt;string&lt;/FONT&gt; WebServerSchema = &lt;FONT color=maroon&gt;"IIsWebServer"&lt;/FONT&gt;; &lt;FONT color=green&gt;// Case Sensitive&lt;/FONT&gt;
                &lt;FONT color=blue&gt;string&lt;/FONT&gt; ServerName = &lt;FONT color=maroon&gt;"LocalHost"&lt;/FONT&gt;;
                DirectoryEntry W3SVC = &lt;FONT color=blue&gt;new&lt;/FONT&gt; DirectoryEntry(&lt;FONT color=maroon&gt;"IIS://"&lt;/FONT&gt; + ServerName + &lt;FONT color=maroon&gt;"/w3svc"&lt;/FONT&gt;);
                &lt;FONT color=blue&gt;foreach&lt;/FONT&gt; (DirectoryEntry Site &lt;FONT color=blue&gt;in&lt;/FONT&gt; W3SVC.Children) 
                {
                    &lt;FONT color=blue&gt;if&lt;/FONT&gt; (Site.SchemaClassName == WebServerSchema) 
                    {
                        &lt;FONT color=blue&gt;string&lt;/FONT&gt; LogFilePath = System.IO.Path.Combine(
                            Site.Properties[&lt;FONT color=maroon&gt;"LogFileDirectory"&lt;/FONT&gt;].Value.ToString(),
                            &lt;FONT color=maroon&gt;"W3CSVC"&lt;/FONT&gt;+Site.Name);
                        www.Add(Site.Properties[&lt;FONT color=maroon&gt;"ServerComment"&lt;/FONT&gt;].Value.ToString(), LogFilePath);
                    }
                }
    
                DirectoryEntry MSFTPSVC = &lt;FONT color=blue&gt;new&lt;/FONT&gt; DirectoryEntry(&lt;FONT color=maroon&gt;"IIS://"&lt;/FONT&gt; + ServerName + &lt;FONT color=maroon&gt;"/msftpsvc"&lt;/FONT&gt;);
                &lt;FONT color=blue&gt;foreach&lt;/FONT&gt; (DirectoryEntry Site &lt;FONT color=blue&gt;in&lt;/FONT&gt; MSFTPSVC.Children) 
                {
                    &lt;FONT color=blue&gt;if&lt;/FONT&gt; (Site.SchemaClassName == FtpServerSchema) 
                    {
                        &lt;FONT color=blue&gt;string&lt;/FONT&gt; LogFilePath = System.IO.Path.Combine(
                            Site.Properties[&lt;FONT color=maroon&gt;"LogFileDirectory"&lt;/FONT&gt;].Value.ToString(), 
                            &lt;FONT color=maroon&gt;"MSFTPSVC"&lt;/FONT&gt;+Site.Name);
                        ftp.Add(Site.Properties[&lt;FONT color=maroon&gt;"ServerComment"&lt;/FONT&gt;].Value.ToString(), LogFilePath);
                    }
                }
                &lt;FONT color=blue&gt;int&lt;/FONT&gt; MaxWidth = &lt;FONT color=maroon&gt;0&lt;/FONT&gt;;
                &lt;FONT color=blue&gt;foreach&lt;/FONT&gt;(&lt;FONT color=blue&gt;string&lt;/FONT&gt; Site &lt;FONT color=blue&gt;in&lt;/FONT&gt; www.Keys)
                {
                    &lt;FONT color=blue&gt;if&lt;/FONT&gt; (Site.Length &amp;gt; MaxWidth)
                        MaxWidth = Site.Length;
                }
                &lt;FONT color=blue&gt;foreach&lt;/FONT&gt;(&lt;FONT color=blue&gt;string&lt;/FONT&gt; Site &lt;FONT color=blue&gt;in&lt;/FONT&gt; ftp.Keys)
                {
                    &lt;FONT color=blue&gt;if&lt;/FONT&gt; (Site.Length &amp;gt; MaxWidth)
                        MaxWidth = Site.Length;
                }
                Console.WriteLine(&lt;FONT color=maroon&gt;"Site Description"&lt;/FONT&gt;.PadRight(MaxWidth)+&lt;FONT color=maroon&gt;"  Log File Directory"&lt;/FONT&gt;);
                Console.WriteLine(&lt;FONT color=maroon&gt;""&lt;/FONT&gt;.PadRight(&lt;FONT color=maroon&gt;79&lt;/FONT&gt;,&lt;FONT color=maroon&gt;'='&lt;/FONT&gt;));
                Console.WriteLine();
                Console.WriteLine(&lt;FONT color=maroon&gt;"WWW Sites"&lt;/FONT&gt;);
                Console.WriteLine(&lt;FONT color=maroon&gt;"========="&lt;/FONT&gt;);
                &lt;FONT color=blue&gt;foreach&lt;/FONT&gt;(&lt;FONT color=blue&gt;string&lt;/FONT&gt; Site &lt;FONT color=blue&gt;in&lt;/FONT&gt; www.Keys)
                {
                    Console.WriteLine(Site.PadRight(MaxWidth) + &lt;FONT color=maroon&gt;"  "&lt;/FONT&gt; + www[Site]);
                }                
                &lt;FONT color=blue&gt;if&lt;/FONT&gt; (ftp.Keys.Count &amp;gt; &lt;FONT color=maroon&gt;0&lt;/FONT&gt;)
                {
                    Console.WriteLine();
                    Console.WriteLine(&lt;FONT color=maroon&gt;"FTP Sites"&lt;/FONT&gt;);
                    Console.WriteLine(&lt;FONT color=maroon&gt;"========="&lt;/FONT&gt;);
                    &lt;FONT color=blue&gt;foreach&lt;/FONT&gt;(&lt;FONT color=blue&gt;string&lt;/FONT&gt; Site &lt;FONT color=blue&gt;in&lt;/FONT&gt; ftp.Keys)
                    {
                        Console.WriteLine(Site.PadRight(MaxWidth) + &lt;FONT color=maroon&gt;"  "&lt;/FONT&gt; + ftp[Site]);
                    }                
                }
            }
                &lt;FONT color=green&gt;// Catch any errors&lt;/FONT&gt;
            &lt;FONT color=blue&gt;catch&lt;/FONT&gt; (Exception e) 
            {
                Console.WriteLine(&lt;FONT color=maroon&gt;"Error: "&lt;/FONT&gt; + e.ToString());
            }
            &lt;FONT color=blue&gt;finally&lt;/FONT&gt;
            {
                Console.WriteLine();
                Console.WriteLine(&lt;FONT color=maroon&gt;"Press enter to close/exit...."&lt;/FONT&gt;);
                Console.Read();
            }
        }
    }
}
&lt;/PRE&gt;
&lt;HR id=null&gt;

&lt;P&gt;To download a ZIP file containing the c# source and executable (.Net 1.1) please &lt;A href="http://blog.crowe.co.nz/attachments/IISHelpDir.ZIP"&gt;click here.&lt;/A&gt;&lt;/P&gt;&lt;img src="http://blog.crowe.co.nz/aggbug/574.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Chris Crowe</dc:creator>
            <guid>http://blog.crowe.co.nz/archive/2006/02/22/574.aspx</guid>
            <pubDate>Tue, 21 Feb 2006 18:44:00 GMT</pubDate>
            <comments>http://blog.crowe.co.nz/archive/2006/02/22/574.aspx#feedback</comments>
            <slash:comments>2</slash:comments>
            <wfw:commentRss>http://blog.crowe.co.nz/comments/commentRss/574.aspx</wfw:commentRss>
        </item>
        <item>
            <title>Basic Web Site Usage Statistics - SpotCheck</title>
            <link>http://blog.crowe.co.nz/archive/2005/10/13/288.aspx</link>
            <description>&lt;P&gt;Spotcheck is a handy, freeware program that provides basic site usage statistics from IIS log files. You don't have to look at any advertising or give us an email address. Just download and use.&lt;BR&gt;&lt;BR&gt;For more details see : &lt;A href="http://www.tcpdata.com/sc_dl.shtml"&gt;http://www.tcpdata.com/sc_dl.shtml&lt;/A&gt;&lt;BR&gt;&lt;/P&gt;&lt;img src="http://blog.crowe.co.nz/aggbug/288.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Chris Crowe</dc:creator>
            <guid>http://blog.crowe.co.nz/archive/2005/10/13/288.aspx</guid>
            <pubDate>Thu, 13 Oct 2005 02:27:00 GMT</pubDate>
            <comments>http://blog.crowe.co.nz/archive/2005/10/13/288.aspx#feedback</comments>
            <slash:comments>1</slash:comments>
            <wfw:commentRss>http://blog.crowe.co.nz/comments/commentRss/288.aspx</wfw:commentRss>
        </item>
        <item>
            <title>Preventing Log Evasion in IIS</title>
            <link>http://blog.crowe.co.nz/archive/2005/08/29/237.aspx</link>
            <description>&lt;P&gt;One of the most important functions a Web site has is the ability to track who is visiting it, where they are coming from, and what they are doing. While logs themselves may not always be the most accurate measurement of what's going on, they do provide a high level overview useful for tracking common user functions and tasks. There are instances when certain types of data aren't logged such as referrers, cookies, user agents, and POST data. Logging can also be used to track abnormal behavior including malicious requests sent by a potential attacker trying to break into your site. These logs can be extremely valuable in identifying if an attack was successful or not, as well as some of the exact commands that an attacker may have executed. &lt;/P&gt;
&lt;P&gt;For more details see the full article at &lt;A href="http://www.webappsec.org/projects/articles/082905.shtml"&gt;http://www.webappsec.org/projects/articles/082905.shtml&lt;/A&gt;&lt;/P&gt;&lt;img src="http://blog.crowe.co.nz/aggbug/237.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Chris Crowe [IIS MVP]</dc:creator>
            <guid>http://blog.crowe.co.nz/archive/2005/08/29/237.aspx</guid>
            <pubDate>Sun, 28 Aug 2005 13:24:00 GMT</pubDate>
            <comments>http://blog.crowe.co.nz/archive/2005/08/29/237.aspx#feedback</comments>
            <wfw:commentRss>http://blog.crowe.co.nz/comments/commentRss/237.aspx</wfw:commentRss>
        </item>
        <item>
            <title>IIS - HTTP Status Codes</title>
            <link>http://blog.crowe.co.nz/archive/2005/08/26/231.aspx</link>
            <description>&lt;P&gt;When you are checking your IIS log files you can find a field which defines the status of the request. This status can be very useful when you are trying to diagnose a problem such as a user being denied access to your site.&lt;/P&gt;
&lt;P&gt;An example from a W3Extended log file format containing 2 log entries from Windows XP Professional&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;&lt;FONT color=#808000&gt;#Software: Microsoft Internet Information Services 5.1&lt;BR&gt;#Version: 1.0&lt;BR&gt;#Date: 2005-08-26 18:19:49&lt;BR&gt;#Fields: date time c-ip cs-username s-sitename s-computername s-ip s-port cs-method cs-uri-stem cs-uri-query &lt;STRONG&gt;sc-status&lt;/STRONG&gt; sc-win32-status sc-bytes cs-bytes time-taken cs-version cs-host &lt;/FONT&gt;&lt;BR&gt;&lt;FONT color=#800000&gt;2005-08-26 18:19:49 127.0.0.1 - W3SVC1 CHRIS 127.0.0.1 80 GET /images/ - &lt;STRONG&gt;302&lt;/STRONG&gt; 0 285 586 62 HTTP/1.1 localhost &lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#800080 size=2&gt;2005-08-26 18:19:49 127.0.0.1 - W3SVC1 CHRIS 127.0.0.1 80 GET /images/ - &lt;STRONG&gt;403&lt;/STRONG&gt; 5 334 587 16 HTTP/1.1 localhost &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;From the above log entries we can see we have a status of 302 (Object moved) for the first request, and a status of 403 (Forbidden) for the second request. But we do not know why the user was denied access. In this case I tried to browse an image directory and it did not have directory browsing enabled which should have logged a 403.14 error but IIS 5.1 and earlier do not support storing the sub status code.&lt;/P&gt;
&lt;P&gt;Doing something similar with IIS 6 on Windows 2003 Server we get these log file entries.&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#808000 size=2&gt;#Software: Microsoft Internet Information Services 6.0&lt;BR&gt;#Version: 1.0&lt;BR&gt;#Date: 2005-08-26 00:03:26&lt;BR&gt;#Fields: date time s-sitename s-computername s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs-version cs-host &lt;STRONG&gt;sc-status sc-substatus&lt;/STRONG&gt; sc-win32-status sc-bytes cs-bytes&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#800000 size=2&gt;2005-08-26 18:33:30 W3SVC68783193 SBS2003 192.168.2.2 GET /images - 80 - 192.168.2.1 HTTP/1.1 &lt;STRONG&gt;301 0&lt;/STRONG&gt; 0 399 432&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#800080 size=2&gt;2005-08-26 18:33:30 W3SVC68783193 SBS2003 192.168.2.2 GET /images/ - 80 - 192.168.2.1 HTTP/1.1 &lt;STRONG&gt;403 14&lt;/STRONG&gt; 5 412 433&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;In the IIS 6 log file example above you can see that I am logging two status fields &lt;B&gt;sc-status&lt;/B&gt; and &lt;B&gt;sc-substatus&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;This time the first request is returning a status of 301 (Object Moved Permanently) and a sub status of 0 which is not used.&lt;BR&gt;The second request returns a status of 403 (Forbidden) and a sub status of 14 (Directory Listing Denied)&lt;/P&gt;
&lt;P&gt;&lt;B&gt;1xx - Informational&lt;/B&gt;&lt;BR&gt;&lt;BR&gt;These status codes indicate a provisional response. The client should be prepared to receive one or more 1xx responses before receiving a regular response. &lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;B&gt;100&lt;/B&gt; - Continue.&lt;BR&gt;&lt;B&gt;101&lt;/B&gt; - Switching protocols.&lt;BR&gt;&amp;nbsp;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;B&gt;2xx - Success&lt;/B&gt;&lt;BR&gt;&lt;BR&gt;This class of status codes indicates that the server successfully accepted the client request. &lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;B&gt;200&lt;/B&gt; - OK. The client request has succeeded.&lt;BR&gt;&lt;B&gt;201&lt;/B&gt; - Created.&lt;BR&gt;&lt;B&gt;202&lt;/B&gt; - Accepted.&lt;BR&gt;&lt;B&gt;203&lt;/B&gt; - Non-authoritative information.&lt;BR&gt;&lt;B&gt;204&lt;/B&gt; - No content.&lt;BR&gt;&lt;B&gt;205&lt;/B&gt; - Reset content.&lt;BR&gt;&lt;B&gt;206&lt;/B&gt; - Partial content.&lt;BR&gt;&amp;nbsp;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;B&gt;3xx - Redirection&lt;/B&gt;&lt;BR&gt;&lt;BR&gt;The client browser must take more action to complete the request. For example, the browser may have to request a different page on the server or repeat the request by using a proxy server. &lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;B&gt;301 - &lt;/B&gt;Moved Permanently&lt;B&gt;&lt;BR&gt;302&lt;/B&gt; - Object moved Temporarily&lt;BR&gt;&lt;B&gt;303 &lt;/B&gt;- See Other&lt;BR&gt;&lt;B&gt;304&lt;/B&gt; - Not modified.&lt;BR&gt;&lt;B&gt;307&lt;/B&gt; - Temporary redirect.&lt;BR&gt;&amp;nbsp;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;B&gt;4xx - Client Error&lt;/B&gt;&lt;BR&gt;&lt;BR&gt;An error occurs, and the client appears to be at fault. For example, the client may request a page that does not exist, or the client may not provide valid authentication information. &lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;B&gt;400&lt;/B&gt; - Bad request.&lt;BR&gt;&lt;B&gt;401&lt;/B&gt; - Access denied. IIS defines a number of different 401 errors that indicate a more specific cause of the error. These specific error codes are displayed in the browser but are not displayed in the IIS log: &lt;/P&gt;
&lt;BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"&gt;
&lt;P&gt;&lt;B&gt;401.1&lt;/B&gt; - Logon failed. &lt;BR&gt;&lt;B&gt;401.2&lt;/B&gt; - Logon failed due to server configuration. &lt;BR&gt;&lt;B&gt;401.3&lt;/B&gt; - Unauthorized due to ACL on resource.&lt;BR&gt;&lt;B&gt;401.4&lt;/B&gt; - Authorization failed by filter.&lt;BR&gt;&lt;B&gt;401.5&lt;/B&gt; - Authorization failed by ISAPI/CGI application. &lt;BR&gt;&lt;B&gt;401.7&lt;/B&gt; &amp;#8211; Access denied by URL authorization policy on the Web server. This error code is specific to IIS 6.0.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;B&gt;403 &lt;/B&gt;- Forbidden. IIS defines a number of different 403 errors that indicate a more specific cause of the error: &lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;B&gt;403.1&lt;/B&gt; - Execute access forbidden.&lt;BR&gt;&lt;B&gt;403.2&lt;/B&gt; - Read access forbidden.&lt;BR&gt;&lt;B&gt;403.3&lt;/B&gt; - Write access forbidden.&lt;BR&gt;&lt;B&gt;403.4&lt;/B&gt; - SSL required.&lt;BR&gt;&lt;B&gt;403.5&lt;/B&gt; - SSL 128 required.&lt;BR&gt;&lt;B&gt;403.6&lt;/B&gt; - IP address rejected.&lt;BR&gt;&lt;B&gt;403.7&lt;/B&gt; - Client certificate required.&lt;BR&gt;&lt;B&gt;403.8&lt;/B&gt; - Site access denied.&lt;BR&gt;&lt;B&gt;403.9&lt;/B&gt; - Too many users.&lt;BR&gt;&lt;B&gt;403.10&lt;/B&gt; - Invalid configuration.&lt;BR&gt;&lt;B&gt;403.11&lt;/B&gt; - Password change.&lt;BR&gt;&lt;B&gt;403.12&lt;/B&gt; - Mapper denied access.&lt;BR&gt;&lt;B&gt;403.13&lt;/B&gt; - Client certificate revoked.&lt;BR&gt;&lt;B&gt;403.14&lt;/B&gt; - Directory listing denied.&lt;BR&gt;&lt;B&gt;403.15&lt;/B&gt; - Client Access Licenses exceeded.&lt;BR&gt;&lt;B&gt;403.16&lt;/B&gt; - Client certificate is untrusted or invalid.&lt;BR&gt;&lt;B&gt;403.17&lt;/B&gt; - Client certificate has expired or is not yet valid.&lt;BR&gt;&lt;B&gt;403.18&lt;/B&gt; - Cannot execute requested URL in the current application pool. This error code is specific to IIS 6.0.&lt;BR&gt;&lt;B&gt;403.19&lt;/B&gt; - Cannot execute CGIs for the client in this application pool. This error code is specific to IIS 6.0.&lt;BR&gt;&lt;B&gt;403.20&lt;/B&gt; - Passport logon failed. This error code is specific to IIS 6.0.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;B&gt;404&lt;/B&gt; - Not found. 404.0 - (None) &amp;#8211; File or directory not found.&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;B&gt;404.1&lt;/B&gt; - Web site not accessible on the requested port.&lt;BR&gt;&lt;B&gt;404.2&lt;/B&gt; - Web service extension lockdown policy prevents this request.&lt;BR&gt;&lt;B&gt;404.3&lt;/B&gt; - MIME map policy prevents this request.&lt;BR&gt;&lt;STRONG&gt;404.4&lt;/STRONG&gt; - No Handler (&lt;STRONG&gt;IIS 7&lt;/STRONG&gt;)&lt;BR&gt;&lt;STRONG&gt;404.5&lt;/STRONG&gt; - Request Filtering: URL Sequence Denied (&lt;STRONG&gt;IIS 7&lt;/STRONG&gt;)&lt;BR&gt;&lt;B&gt;404.6&lt;/B&gt; - Request Filtering: Verb denied (&lt;STRONG&gt;IIS 7&lt;/STRONG&gt;)&lt;BR&gt;&lt;B&gt;404.7&lt;/B&gt; - Request Filtering: File extension denied (&lt;STRONG&gt;IIS 7&lt;/STRONG&gt;)&lt;BR&gt;&lt;B&gt;404.8&lt;/B&gt; - Request Filtering: Denied by hidden namespace (&lt;STRONG&gt;IIS 7&lt;/STRONG&gt;)&lt;BR&gt;&lt;B&gt;404.9&lt;/B&gt; - Denied since hidden file attribute has been set (&lt;STRONG&gt;IIS 7&lt;/STRONG&gt;)&lt;BR&gt;&lt;B&gt;404.10&lt;/B&gt; - Request Filtering: Denied because request header is too long (&lt;STRONG&gt;IIS 7&lt;/STRONG&gt;)&lt;BR&gt;&lt;B&gt;404.11&lt;/B&gt;- Request Filtering: Denied because URL doubled escaping (&lt;STRONG&gt;IIS 7&lt;/STRONG&gt;)&lt;BR&gt;&lt;B&gt;404.12&lt;/B&gt; - Request Filtering: Denied because of high bit characters (&lt;STRONG&gt;IIS 7&lt;/STRONG&gt;)&lt;BR&gt;&lt;B&gt;404.13&lt;/B&gt; - Request Filtering: Denied because content length too large (&lt;STRONG&gt;IIS 7&lt;/STRONG&gt;)&lt;BR&gt;&lt;B&gt;404.14&lt;/B&gt; - Request Filtering: Denied because URL too long (&lt;STRONG&gt;IIS 7&lt;/STRONG&gt;)&lt;BR&gt;&lt;B&gt;404.15&lt;/B&gt;- Request Filtering: Denied because query string too long (&lt;STRONG&gt;IIS 7&lt;/STRONG&gt;)&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;B&gt;405&lt;/B&gt; - HTTP verb used to access this page is not allowed (method not allowed.) &lt;BR&gt;&lt;B&gt;406&lt;/B&gt; - Client browser does not accept the MIME type of the requested page.&lt;BR&gt;&lt;B&gt;407&lt;/B&gt; - Proxy authentication required.&lt;BR&gt;&lt;B&gt;412&lt;/B&gt; - Precondition failed.&lt;BR&gt;&lt;B&gt;413&lt;/B&gt; &amp;#8211; Request entity too large.&lt;BR&gt;&lt;B&gt;414&lt;/B&gt; - Request-URI too long.&lt;BR&gt;&lt;B&gt;415&lt;/B&gt; &amp;#8211; Unsupported media type.&lt;BR&gt;&lt;B&gt;416&lt;/B&gt; &amp;#8211; Requested range not satisfiable.&lt;BR&gt;&lt;B&gt;417&lt;/B&gt; &amp;#8211; Execution failed.&lt;BR&gt;&lt;B&gt;423&lt;/B&gt; &amp;#8211; Locked error.&lt;BR&gt;&amp;nbsp;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;B&gt;5xx - Server Error&lt;/B&gt;&lt;BR&gt;&lt;BR&gt;The server cannot complete the request because it encounters an error. &lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;B&gt;500&lt;/B&gt; - Internal server error. 
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;B&gt;500.12&lt;/B&gt; - Application is busy restarting on the Web server.&lt;BR&gt;&lt;B&gt;500.13&lt;/B&gt; - Web server is too busy.&lt;BR&gt;&lt;B&gt;500.15&lt;/B&gt; - Direct requests for Global.asa are not allowed.&lt;BR&gt;&lt;B&gt;500.16&lt;/B&gt; &amp;#8211; UNC authorization credentials incorrect. This error code is specific to IIS 6.0.&lt;BR&gt;&lt;B&gt;500.18&lt;/B&gt; &amp;#8211; URL authorization store cannot be opened. This error code is specific to IIS 6.0.&lt;BR&gt;&lt;B&gt;500.100&lt;/B&gt; - Internal ASP error.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;B&gt;501&lt;/B&gt; - Header values specify a configuration that is not implemented.&lt;BR&gt;&lt;B&gt;502&lt;/B&gt; - Web server received an invalid response while acting as a gateway or proxy. &lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;B&gt;502.1&lt;/B&gt; - CGI application timeout.&lt;BR&gt;&lt;B&gt;502.2&lt;/B&gt; - Error in CGI application.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;B&gt;503&lt;/B&gt; - Service unavailable. This error code is specific to IIS 6.0.&lt;BR&gt;&lt;B&gt;504&lt;/B&gt; - Gateway timeout.&lt;BR&gt;&lt;B&gt;505&lt;/B&gt; - HTTP version not supported.&lt;BR&gt;&amp;nbsp;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;For more details see these resources : &lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;RFC 2616 - Http Status Codes&lt;BR&gt;&lt;A href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html"&gt;http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html&lt;/A&gt;&lt;BR&gt;&lt;BR&gt;&amp;nbsp; &lt;/LI&gt;
&lt;LI&gt;Microsoft KB Article - Common HTTP Status Codes and Their Causes&lt;BR&gt;&lt;A href="http://support.microsoft.com/default.aspx?scid=kb;en-us;318380"&gt;http://support.microsoft.com/default.aspx?scid=kb;en-us;318380&lt;/A&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;img src="http://blog.crowe.co.nz/aggbug/231.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Chris Crowe</dc:creator>
            <guid>http://blog.crowe.co.nz/archive/2005/08/26/231.aspx</guid>
            <pubDate>Fri, 26 Aug 2005 01:18:00 GMT</pubDate>
            <comments>http://blog.crowe.co.nz/archive/2005/08/26/231.aspx#feedback</comments>
            <slash:comments>15</slash:comments>
            <wfw:commentRss>http://blog.crowe.co.nz/comments/commentRss/231.aspx</wfw:commentRss>
        </item>
        <item>
            <title>Log Parser - Different Output Formats available</title>
            <link>http://blog.crowe.co.nz/archive/2005/08/24/229.aspx</link>
            <description>&lt;P&gt;In this blog entry we will display the same output in a number of different formats that Log Parser is capable of providing.&lt;/P&gt;
&lt;H3&gt;Default&lt;/H3&gt;
&lt;P&gt;Using the default output format the results are displayed inside of the command prompt.&lt;/P&gt;
&lt;TABLE id=table3 style="BORDER-COLLAPSE: collapse" cellSpacing=0 cellPadding=5 bgColor=#ffffcc border=1&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD&gt;SELECT top 25 distinct c-ip as ClientIP, Count(*) as Hits&lt;BR&gt;FROM \\sbs2003\LogFiles\W3SVC68783193\ex0508*.log&lt;BR&gt;group by c-ip&lt;BR&gt;order by Hits, c-ip desc&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;
&lt;P&gt;&lt;B&gt;&lt;BR&gt;Command Line&lt;/B&gt;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;FONT color=#800080&gt;&lt;B&gt;LogParser.exe file:distinctclientrequests.sql&lt;/B&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;B&gt;Output&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;IMG height=290 src="/images/LogParserOutputDefault.gif" width=669 border=0&gt;&lt;/P&gt;
&lt;P&gt;Notice in the above listing you get a "&lt;B&gt;Press a key...&lt;/B&gt;" displayed you can turn this off if you use the &lt;B&gt;-rtp:-1&lt;/B&gt; switch&lt;/P&gt;
&lt;H3&gt;Chart&lt;/H3&gt;
&lt;P&gt;Using an output format of a chart you can create nice graphs of log entries&lt;/P&gt;
&lt;TABLE id=table1 style="BORDER-COLLAPSE: collapse" cellSpacing=0 cellPadding=5 bgColor=#ffffcc border=1&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD&gt;SELECT top 25 distinct c-ip as ClientIP, Count(*) as Hits&lt;BR&gt;&lt;B&gt;into test.gif&lt;/B&gt;&lt;BR&gt;FROM \\sbs2003\LogFiles\W3SVC68783193\ex0508*.log&lt;BR&gt;group by c-ip&lt;BR&gt;order by Hits, c-ip desc&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;
&lt;P&gt;&lt;B&gt;&lt;BR&gt;Command Line&lt;/B&gt;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;FONT color=#800080&gt;&lt;B&gt;LogParser.exe file:distinctclientrequests.sql -view&lt;/B&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;B&gt;Output&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;The output in this case is a file on disk called &lt;B&gt;test.gif&lt;/B&gt;. and the &lt;B&gt;-view&lt;/B&gt; parameter displays it in a window. &lt;/P&gt;
&lt;P&gt;&lt;IMG height=506 src="/images/LogParserOutputChart.gif" width=646 border=0&gt;&lt;BR&gt;&amp;nbsp;&lt;/P&gt;
&lt;H3&gt;DataGrid&lt;/H3&gt;
&lt;P&gt;Using an output format of a DataGrid you can view the results inside of a grid which is a lot easier for viewing the results in certain circumstances.&lt;/P&gt;
&lt;TABLE id=table2 style="BORDER-COLLAPSE: collapse" cellSpacing=0 cellPadding=5 bgColor=#ffffcc border=1&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD&gt;SELECT top 25 distinct c-ip as ClientIP, Count(*) as Hits&lt;BR&gt;&lt;B&gt;into DATAGRID&lt;/B&gt;&lt;BR&gt;FROM \\sbs2003\LogFiles\W3SVC68783193\ex0508*.log&lt;BR&gt;group by c-ip&lt;BR&gt;order by Hits, c-ip desc&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;
&lt;P&gt;&lt;B&gt;&lt;BR&gt;Command Line&lt;/B&gt;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;FONT color=#800080&gt;&lt;B&gt;LogParser.exe file:distinctclientrequests.sql &lt;/B&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;B&gt;Output&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;IMG height=281 src="/images/LogParserOutputDataGrid.gif" width=412 border=0&gt;&lt;/P&gt;&lt;img src="http://blog.crowe.co.nz/aggbug/229.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Chris Crowe [IIS MVP]</dc:creator>
            <guid>http://blog.crowe.co.nz/archive/2005/08/24/229.aspx</guid>
            <pubDate>Wed, 24 Aug 2005 04:41:00 GMT</pubDate>
            <comments>http://blog.crowe.co.nz/archive/2005/08/24/229.aspx#feedback</comments>
            <slash:comments>1</slash:comments>
            <wfw:commentRss>http://blog.crowe.co.nz/comments/commentRss/229.aspx</wfw:commentRss>
        </item>
        <item>
            <title>LogParser - How to retreive the log filename where a LogFileEntry is from.</title>
            <link>http://blog.crowe.co.nz/archive/2005/08/24/228.aspx</link>
            <description>&lt;P&gt;When using Log Parser you may want to include the log file name that the client data was extracted from. If you are using the W3C format you can do this with the &lt;STRONG&gt;LogFilename&lt;/STRONG&gt; input field which will return the full path to the log filename that contains the row of data.&lt;/P&gt;
&lt;P&gt;Save the data below as &lt;B&gt;distinctclientrequests.sql&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;
&lt;TABLE id=table2 style="BORDER-COLLAPSE: collapse" cellSpacing=0 cellPadding=5 bgColor=#ffffcc border=1&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD&gt;SELECT&amp;nbsp;top 25 distinct LogFilename, c-ip as ClientIP, Count(*) as Hits&lt;BR&gt;FROM &lt;A href="file://sbs2003/LogFiles/W3SVC68783193/ex0508*.log"&gt;\\sbs2003\LogFiles\W3SVC68783193\ex0508*.log&lt;/A&gt;&lt;BR&gt;group by c-ip, LogFilename&lt;BR&gt;order by Hits, c-ip desc&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;Command Line&lt;/B&gt;&lt;/P&gt;
&lt;BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"&gt;
&lt;P&gt;&lt;B&gt;&lt;FONT color=#800080&gt;LogParser.exe file:distinctclientrequests.sql&lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;STRONG&gt;Example Output:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;
&lt;TABLE id=table1 style="BORDER-COLLAPSE: collapse" cellPadding=2 bgColor=#ffffcc border=1&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD bgColor=#808000&gt;&lt;B&gt;&lt;FONT color=#ffffff&gt;LogFilename&lt;/FONT&gt;&lt;/B&gt;&lt;/TD&gt;
&lt;TD bgColor=#808000&gt;&lt;B&gt;&lt;FONT color=#ffffff&gt;ClientIP&lt;/FONT&gt;&lt;/B&gt;&lt;/TD&gt;
&lt;TD bgColor=#808000&gt;&lt;B&gt;&lt;FONT color=#ffffff&gt;Hits&lt;/FONT&gt;&lt;/B&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;&lt;A href="file://sbs2003/LogFiles/W3SVC68783193/ex050819.log"&gt;\\sbs2003\LogFiles\W3SVC68783193\ex050819.log&lt;/A&gt;&lt;/TD&gt;
&lt;TD&gt;192.168.2.1&lt;/TD&gt;
&lt;TD&gt;2791&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;&lt;A href="file://sbs2003/LogFiles/W3SVC68783193/ex050809.log"&gt;\\sbs2003\LogFiles\W3SVC68783193\ex050809.log&lt;/A&gt;&lt;/TD&gt;
&lt;TD&gt;192.168.2.1&lt;/TD&gt;
&lt;TD&gt;2296&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;&lt;A href="file://sbs2003/LogFiles/W3SVC68783193/ex050807.log"&gt;\\sbs2003\LogFiles\W3SVC68783193\ex050807.log&lt;/A&gt;&lt;/TD&gt;
&lt;TD&gt;218.101.54.21&lt;/TD&gt;
&lt;TD&gt;2262&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;&lt;A href="file://sbs2003/LogFiles/W3SVC68783193/ex050806.log"&gt;\\sbs2003\LogFiles\W3SVC68783193\ex050806.log&lt;/A&gt;&lt;/TD&gt;
&lt;TD&gt;192.168.2.1&lt;/TD&gt;
&lt;TD&gt;1967&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;&lt;A href="file://sbs2003/LogFiles/W3SVC68783193/ex050811.log"&gt;\\sbs2003\LogFiles\W3SVC68783193\ex050811.log&lt;/A&gt;&lt;/TD&gt;
&lt;TD&gt;192.168.2.1&lt;/TD&gt;
&lt;TD&gt;1838&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;&lt;A href="file://sbs2003/LogFiles/W3SVC68783193/ex050808.log"&gt;\\sbs2003\LogFiles\W3SVC68783193\ex050808.log&lt;/A&gt;&lt;/TD&gt;
&lt;TD&gt;218.101.54.21&lt;/TD&gt;
&lt;TD&gt;1744&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;&lt;A href="file://sbs2003/LogFiles/W3SVC68783193/ex050810.log"&gt;\\sbs2003\LogFiles\W3SVC68783193\ex050810.log&lt;/A&gt;&lt;/TD&gt;
&lt;TD&gt;192.168.2.1&lt;/TD&gt;
&lt;TD&gt;1441&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;&lt;A href="file://sbs2003/LogFiles/W3SVC68783193/ex050804.log"&gt;\\sbs2003\LogFiles\W3SVC68783193\ex050804.log&lt;/A&gt;&lt;/TD&gt;
&lt;TD&gt;218.101.54.21&lt;/TD&gt;
&lt;TD&gt;1372&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;&lt;A href="file://sbs2003/LogFiles/W3SVC68783193/ex050811.log"&gt;\\sbs2003\LogFiles\W3SVC68783193\ex050811.log&lt;/A&gt;&lt;/TD&gt;
&lt;TD&gt;218.101.54.21&lt;/TD&gt;
&lt;TD&gt;1243&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;&lt;A href="file://sbs2003/LogFiles/W3SVC68783193/ex050824.log"&gt;\\sbs2003\LogFiles\W3SVC68783193\ex050824.log&lt;/A&gt;&lt;/TD&gt;
&lt;TD&gt;192.168.2.1&lt;/TD&gt;
&lt;TD&gt;965&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/P&gt;
&lt;P&gt;If you are wanting to only get the &lt;B&gt;log filename&lt;/B&gt; and not the full path you could use the following query:&lt;/P&gt;
&lt;P&gt;Save the data below as &lt;B&gt;distinctclientrequests.sql&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;
&lt;TABLE id=table5 style="BORDER-COLLAPSE: collapse" cellSpacing=0 cellPadding=5 bgColor=#ffffcc border=1&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD&gt;SELECT&amp;nbsp;top 25 distinct &lt;B&gt;EXTRACT_FILENAME&lt;/B&gt;(LogFilename) as LogFile, c-ip as ClientIP, Count(*) as Hits&lt;BR&gt;FROM &lt;A href="file://sbs2003/LogFiles/W3SVC68783193/ex0508*.log"&gt;\\sbs2003\LogFiles\W3SVC68783193\ex0508*.log&lt;/A&gt;&lt;BR&gt;group by c-ip, LogFile&lt;BR&gt;order by Hits, c-ip desc&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;Command Line&lt;/B&gt;&lt;/P&gt;
&lt;BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"&gt;
&lt;P dir=ltr&gt;&lt;B&gt;&lt;FONT color=#800080&gt;LogParser.exe file:distinctclientrequests.sql&lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;STRONG&gt;Example Output:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;
&lt;TABLE id=table6 style="BORDER-COLLAPSE: collapse" cellPadding=2 bgColor=#ffffcc border=1&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD bgColor=#808000&gt;&lt;B&gt;&lt;FONT color=#ffffff&gt;LogFile&lt;/FONT&gt;&lt;/B&gt;&lt;/TD&gt;
&lt;TD bgColor=#808000&gt;&lt;B&gt;&lt;FONT color=#ffffff&gt;ClientIP&lt;/FONT&gt;&lt;/B&gt;&lt;/TD&gt;
&lt;TD bgColor=#808000&gt;&lt;B&gt;&lt;FONT color=#ffffff&gt;Hits&lt;/FONT&gt;&lt;/B&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;&lt;A href="file://ex050819.log/"&gt;ex050819.log&lt;/A&gt;&lt;/TD&gt;
&lt;TD&gt;192.168.2.1&lt;/TD&gt;
&lt;TD&gt;2791&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;&lt;A href="file://sbs2003/LogFiles/W3SVC68783193/ex050809.log"&gt;ex050809.log&lt;/A&gt;&lt;/TD&gt;
&lt;TD&gt;192.168.2.1&lt;/TD&gt;
&lt;TD&gt;2296&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;&lt;A href="file://sbs2003/LogFiles/W3SVC68783193/ex050807.log"&gt;ex050807.log&lt;/A&gt;&lt;/TD&gt;
&lt;TD&gt;218.101.54.21&lt;/TD&gt;
&lt;TD&gt;2262&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;&lt;A href="file://sbs2003/LogFiles/W3SVC68783193/ex050806.log"&gt;ex050806.log&lt;/A&gt;&lt;/TD&gt;
&lt;TD&gt;192.168.2.1&lt;/TD&gt;
&lt;TD&gt;1967&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;&lt;A href="file://sbs2003/LogFiles/W3SVC68783193/ex050811.log"&gt;ex050811.log&lt;/A&gt;&lt;/TD&gt;
&lt;TD&gt;192.168.2.1&lt;/TD&gt;
&lt;TD&gt;1838&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;&lt;A href="file://ex050808.log/"&gt;ex050808.log&lt;/A&gt;&lt;/TD&gt;
&lt;TD&gt;218.101.54.21&lt;/TD&gt;
&lt;TD&gt;1744&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;&lt;A href="file://ex050810.log/"&gt;ex050810.log&lt;/A&gt;&lt;/TD&gt;
&lt;TD&gt;192.168.2.1&lt;/TD&gt;
&lt;TD&gt;1441&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;&lt;A href="file://ex050804.log/"&gt;ex050804.log&lt;/A&gt;&lt;/TD&gt;
&lt;TD&gt;218.101.54.21&lt;/TD&gt;
&lt;TD&gt;1372&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;&lt;A href="file://ex050811.log/"&gt;ex050811.log&lt;/A&gt;&lt;/TD&gt;
&lt;TD&gt;218.101.54.21&lt;/TD&gt;
&lt;TD&gt;1243&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;&lt;A href="file://ex050824.log/"&gt;ex050824.log&lt;/A&gt;&lt;/TD&gt;
&lt;TD&gt;192.168.2.1&lt;/TD&gt;
&lt;TD&gt;965&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/P&gt;&lt;img src="http://blog.crowe.co.nz/aggbug/228.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Chris Crowe [IIS MVP]</dc:creator>
            <guid>http://blog.crowe.co.nz/archive/2005/08/24/228.aspx</guid>
            <pubDate>Wed, 24 Aug 2005 03:46:00 GMT</pubDate>
            <comments>http://blog.crowe.co.nz/archive/2005/08/24/228.aspx#feedback</comments>
            <wfw:commentRss>http://blog.crowe.co.nz/comments/commentRss/228.aspx</wfw:commentRss>
        </item>
    </channel>
</rss>
