Thursday, December 18, 2008

WTF: ASP.NET Tracing

What The F*ck!

Using the Microsoft.VisualBasic.Logging.FileLogTraceListener for tracing within my (C#) ASP.NET website only succeeds if a folder 'C:\Documents and Settings\Default User\Application Data\Microsoft Corporation\Internet Information Services\6.0.3790.1830' is present (read: on my webserver). For some reason the specified path, wherever it comes from (?), is used as a temporary location, even if the actual location is configured to be elsewhere.

Eg.:

<listeners>
<add name="MyTraceListener"
type="Microsoft.VisualBasic.Logging.FileLogTraceListener, Microsoft.VisualBasic, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
Location="Custom"
CustomLocation="c:\temp"
LogFileCreationSchedule="Daily"
BaseFileName="ArtImageProcessorJob"
traceOutputOptions="DateTime"
/>
</listeners>