Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

share|improve this question

2 Answers 2

up vote 11 down vote accepted

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.

share|improve this answer
    
+1 for a more complete answer than my own. Great book btw! –  osij2is Dec 1 '09 at 5:53
    
Thanks osij2is! –  Scott Forsyth - MVP Dec 1 '09 at 14:18
    
does it log the errors too? :) or only event and activities? :) –  Zafarbek Jul 17 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 - MVP Jul 18 at 3:36

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

FTA:

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.