My ASP.NET MVC application on my development box is running wild; I can't even connected to localhost. In order to know what is the problem, I want to find the log file and examine it.

Where is the location of the ASP.NET Server log file? I couldn't find it in event viewer, so I don't know where else to look

  • 2,865
  • 12
  • 42
  • 64

2 Answers2


ASP.NET uses IIS logging, so it's really an IIS question. Though there is some detailed info in Event Viewer for some types of events.

In IIS6 (and prior), this is located in %SystemRoot%\system32\logfiles, and in IIS7, this is located in %SystemDrive%\inetpub\logs\LogFiles.

In both cases, it will be placed in a subfolder called W3SVC{Id}. The Id is the site Id. You can find it by clicking on "Web Sites" in IIS Manager and the site ID will show in that view.

Click on Sites to see the website ID

  • 231
  • 5
  • 15
Scott Forsyth
  • 16,449
  • 3
  • 37
  • 56
  • 1
    +1 for a more complete answer than my own. Great book btw! – osij2is Dec 01 '09 at 05:53
  • does it log the errors too? :) or only event and activities? :) – Zafar Jul 17 '14 at 14:07
  • @Zafar. Error status codes are logged (e.g. 500) but that only tells you that an error occured. It doesn't provide further info. Details would need to be found in Event Viewer. Consider an error logging framework like ELHAM or Log2Net for the best error logging and notifications. – Scott Forsyth Jul 18 '14 at 03:36
  • IIS 6.2 appears to store these logs in the place you say for IIS 7?! – user2254951 Jul 06 '22 at 07:53

I believe this is what you're looking for (link).


IIS uses a flexible and efficient logging architecture. When a loggable event, usually an HTTP transaction, occurs, IIS calls the selected logging module, which then writes to one of the logs stored in %SystemRoot%\system32\Logfiles\.

You can alter the location of the ASP.NET Log Files on an application basis within the IIS management console.

  • 3,885
  • 2
  • 24
  • 31