log4net - Epi unknown exception

Vote:
 

On my production server I use log4net to log errors and so on. About four times a minute(!) I get this entry in the log:

2009-04-29 13:13:03,105 ERROR [1] EPiServer.Global.Global_Error - 1.2.5 Unhandled exception in ASP.NET

I use the following log4net conversion pattern:

%date %level [%thread] %type.%method - %message%n%n%exception%n------------------%n%n

In the SDK I found the documention of the Global class and it seems the log entry is being made in the Global_Error method when it fails to get Server.GetLastError();

Exception e;
try
{
//Get the previous exception
e = Server.GetLastError();
}
catch
{
return;
}
_log.Error("1.2.5 Unhandled exception in ASP.NET", e);

 

There are no entries in the event log, so no help there finding out what causes the error.

Does anyone know what I can do to catch this? I get alooot of log email now. ;)

#29496
Apr 29, 2009 13:31
Vote:
 

A tip is to look at the thread information in your EPiserver log file when your root logger level is set to ALL. Then look at all messages for a certain thread that causes the error, and may be you can figure out what's wrong.  I have written in my notes how to set the logging level in EPiServer http://epiwiki.se/configuration/logging

#29515
Apr 30, 2009 11:35
Vote:
 
Thank you Mattias. Setting the level to ALL helped me track down the error.
#29603
May 06, 2009 14:48
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.