How to use TraceSource.TraceEvent in a ASP.NET C# web application

Solution 1:

I think you forgot to close your source.

Just modify your code to this

var traceSource = new TraceSource("TraceSourceName");
traceSource.TraceEvent(TraceEventType.Error, 2, "Hello World !");
traceSource.Close();