Tracing web service in ASP.NET 2.0
Today I'm playing with december VS 2005 CTP and I'm trouble. I don't know why the tracing isn't working (I'm sure I'm missing something...too much italian wine and food during Christmas's day). So, I started adding the following code to my web.config:
<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
<system.diagnostics>
<trace autoflush="true">
<listeners>
<add name="traceFile" type="System.Diagnostics.TextWriterTraceListener" initializeData="C:\Inetpub\wwwroot\WebTest\Log\trace.log" />
<remove name="Default" />
</listeners>
</trace>
</system.diagnostics>
<appSettings/>
<connectionStrings/>
<system.web>
<trace enabled="true" />
<compilation debug="true"/>
<authentication mode="Windows"/>
</system.web>
</configuration>
Then I set the write access to the log file folder (ASPNET, I'm using Windows XP SP2) and finally I added a WriteLine to my HelloWorld web service:
System.Diagnostics.Trace.WriteLine("Hello world called");
I ran it and no log file written. I checked the Trace instance and the listeners is in the collection. But no log. Mmmm, do I miss something ?