Hi:
I'm working on a custom URL Rewrite extension. I would like my extenstion to be able to send trace messages to the Failed Request Tracing log. It is my understanding that I need to set up the System.Diagnostics section of my web.config to include the IISTraceListener.
I followed the instrctions in the how to article reference here: http://www.iis.net/learn/develop/runtime-extensibility/how-to-add-tracing-to-iis-managed-modules . However, when I run my extension I don't see anything in the FRT logs.
When I debug the extenstion, I see that the IISTraceListener is not assocated weith the TraceSource when I create an instance.
I've even tried to create an instance via code and associate it with the TraceSource. I still dont' see anything in the logs.
Here is the chuck of code I'm calling to write out the trace message:
TraceSource traceSource = new TraceSource("theBarRWP"); traceSource.TraceEvent(TraceEventType.Error, 0, errMsg);
Here is the relevant section of the web.config:
<system.diagnostics> <sharedListeners> <add name="IisTraceListener" type="System.Web.IisTraceListener" /> </sharedListeners> <switches> <add name="DefaultSwitch" value="All" /> </switches> <sources> <source name="theBarRWP" switchName="DefaultSwitch" switchValue="All"> <listeners> <add name="IisTraceListener" type="System.Web.IisTraceListener" /> </listeners> </source> </sources> </system.diagnostics>
Any guidance/suggestions are appreciated.
Thanks
marc