AaronLS
AaronLS

Reputation: 38367

Enable event logging of unhandled exceptions in ASP.NET

I am getting this error:

Server Application Unavailable The web application you are attempting to access on this web server is currently unavailable. Please hit the "Refresh" button in your web browser to retry your request.

Administrator Note: An error message detailing the cause of this specific request failure can be found in the application event log of the web server. Please review this log entry to discover what caused this error to occur.

However there is no error in the application event logs. So I am wondering if there's a specific setting in IIS or for the virtual site that enables logging?

Changing the customerror setting in the web.config seems to have no effect. I don't think it's even getting that far.

IIS 6, Windows Server 2003

Upvotes: 4

Views: 10215

Answers (3)

rjchicago
rjchicago

Reputation: 596

Open the IIS metabase... %systemroot%\system32\inetserv\metabase.xml

Check in the IIS metabase that AspErrorsToNTLog is not FALSE. If it is, change to TRUE and save.

http://msdn.microsoft.com/en-us/library/ms524984(v=vs.90).aspx

To enable the edit-while running feature of the metabase by using IIS Manager

  1. In IIS Manager, right-click the local computer, and then click Properties.
  2. Select the Enable Direct Metabase Edit check box, and then click OK.

To modify the IIS metabase

  1. Open the Metabase.xml file in a text editor. The default path to this file is systemroot\system32\inetserv\metabase.xml
  2. Modify the metabase properties that you wish to change in the Metabase.xml file.
  3. Save the changes to the file, and close the text editor.

Upvotes: 1

Johnny DropTables
Johnny DropTables

Reputation: 656

Try navigating to the site in IIS, right-click the default page, and choose browse. If the page opens, you might be accessing it via the wrong url/port. If it doesn't, then you should start looking at the logs.

Upvotes: -1

Peter
Peter

Reputation: 9712

I believe, but could be wrong, that this is stored in the IIS Log. You can find the path to your IIS log by opening up the IIS management interface, going to the Properties of yoru website/webroot, going to the Web Site tab, and then at the bottom click the Properties button next to the Active log format drop down list. In the bottom of the Extended Logging Properties window will be a Log File Directory path along with the name of the folder and naming convention used for the log files.

Mine is located at C:\WINDOWS\System32\LogFiles\ in the W3SVC1 folder, but thats on XP so it might be different on a windows server.

Upvotes: 1

Related Questions