Diagnose issues in .NET code deployed to a production environment, C# .NET

I want to find out what methods or tools in general can be used diagnose issues in .NET code deployed to a production environment.

Thanks!

Update

The types of application on live: Web application, WCF application.


Solution 1:

Depending on the type of issue I am looking at, I usually go down this list:

  1. Custom logs (if any).
  2. Event logs.
  3. .NET, IIS and ASP.NET Performance Counters.
  4. Add Soap tracing, System.Net tracing, System.Net.Sockets tracing.
  5. WinDbg memory/crash dump analysis.

Solution 2:

If your .NET project is deployed to the production environment it's rather hard to debug it.

The one way is to have some logging tools integrated into software (e.g. log4net) and to analyse the log messages.