1

I am working on a web application (ASP.NET 3.5/C#) based on a legacy application over which we have implemented our code. The application is hosted on a Virtual Machine where MS Server 2003 with IIS 6 is installed.

Randomly some exceptions occur, like:"Loading this assembly would produce a different grant" without giving us much information on where/why does it happen in the application. For this reason we want to track the web application in order to get as much information as possible about its behaviour.

We have just started using "NLog" to track the users activity and the Requests/Responsed in a log file. However can anyone suggest some further application in order to get more information?

Since part of the code is not accessible due to the legacy application, a solution that would avoid direct interaction with the code (as example the need to instantiate the application in the code itself) would be preferrable.

Francesco
  • 9,947
  • 7
  • 67
  • 110

2 Answers2

1

I would suggest to use Elmah. Its a really cool and simple to use error logging Framework especially for asp.net. Check it out there http://code.google.com/p/elmah/

dasheddot
  • 2,936
  • 4
  • 26
  • 33
  • Thanks dasheddot for your answer. We are already using Elmah too in Production to log errors. However the information provided in Elmah's messages are not enough to understand what brings to those exceptions. Therefore I was looking to something more specific. – Francesco Nov 26 '11 at 14:47
1

You can try using adplus on the application pool process and generate dump whenever application throws exception. For instance executing following command:

 ADPlus -crash -iis -o c:\dumps

will produce memory dumps of IIS and all MTS/COM+ packages currently running. By default it creates mini dumps on first chance exceptions (so those that might have been handled) and full dumps on second change exception (unhandled ones). If you are interested only in one particular pool you may use its PID (here is info how to get it) and run:

ADPlus -crash -p <pid> -o c:\dumps

After getting a dump you may load it into Visual Studio and try to debug your app (remember to configure your symbols path correctly)

Community
  • 1
  • 1
Sebastian
  • 3,764
  • 21
  • 28