Saturday, October 31, 2015

IIS Log files

Have you ever wondered about logs of IIS. Yes, they do exist, providing a lot of vital information about the applications that we have hosted in the IIS. For each website we host in IIS, it's logs are created and can be configured for different settings. 

To test it, let's create a sample ASP.Net application and we name it as IISLogging and host it in the IIS. Browse the application to check it is hosted properly.

Now in order to check the logs, click on the website and select the Logging option in the right pane and double click to open it. 

Clicking the option will open the logging settings section. Here we can check what is the location of the IIS logs for our website, which we have hosted. Also it provides different configuration settings for generation of the log files.

Now go to the location as displayed and check out the log files getting generated. Now here you can see different folders getting generated with the name prefix as W3SVC and a number added to it as a suffix. 

How to identify the website IIS log file ?

Now here you may have different folders getting generated. But which one is yours. In order to identify this, go to the website in the IIS and click Advance Settings for the website. This will open it's settings windows. 

Check the ID property. This is the ID of the website in IIS and your log file folder will have this number as the suffix attached to it. So in our case the log file folder is W3SVC2. Check the folder and we can see the log file generated for it.

So we have our log files generated based on the dates here. 

How to analyze IIS log files ?

In order to read these log files in effective way, different tools are available which include log parser lizard and weblog expert. So happy logging now...!!!

No comments:

Post a Comment