title: TraceSource and ASP.NET: Works for Web Applications, not WebSites
body: <p>I'm adding tracing functionality to an ASP.NET website so I decided to investigate <a href="http://msdn.microsoft.com/en-us/library/system.diagnostics.tracesource.aspx" rel="nofollow">TraceSource</a> by creating a couple of prototypes; a Web Application project and a Website project.</p>
  
  <p>I'm using similar Web.config for each project to log traces to the Windows Event Log:</p>
  
  <pre><code>&lt;configuration&gt;
      &lt;system.web&gt;
          &lt;compilation debug="true" strict="false" explicit="true" targetFramework="4.0"/&gt;
      &lt;/system.web&gt;    
      &lt;system.diagnostics&gt;
          &lt;trace autoflush="true" /&gt;
          &lt;sources&gt;
              &lt;source name="HelloWorld"&gt;
                  &lt;listeners&gt;
                      &lt;add name="eventlogListener" /&gt;
                  &lt;/listeners&gt;
              &lt;/source&gt;
          &lt;/sources&gt;    
          &lt;sharedListeners&gt;
              &lt;add name="eventlogListener" type="System.Diagnostics.EventLogTraceListener" initializeData="My Source" /&gt;
          &lt;/sharedListeners&gt;
      &lt;/system.diagnostics&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p>I'm simply starting with the following basic trace:</p>
  
  <pre><code>private static TraceSource _ts = new TraceSource("HelloWorld", SourceLevels.All);
  
  protected override void OnLoad(EventArgs e)
  {
      base.OnLoad(e);
  
      _ts.TraceEvent(TraceEventType.Information, 10, "Greetings from OnLoad.");
  }
  </code></pre>
  
  <p>With the Web Application project, I can see the trace created in the Event Log.  However, with the Website project, I cannot.</p>
  
  <p>Are additional steps (Ex: web.config settings, permissions, etc) required with the Website projects to use TraceSource?</p>