问题
I am trying to figure out how to make a 3.5 WCF service thats hosted under IIS write to the asp.net trace?
回答1:
My guess is that you would add this to the web.config file:
<system.diagnostics>
<sources>
<source name="System.ServiceModel" switchValue="Information, ActivityTracing">
<listeners>
<add name="AspTraceListener"
type="System.Web.WebPageTraceListener" />
</listeners>
</source>
</sources>
</system.diagnostics>
来源:https://stackoverflow.com/questions/4341618/how-to-make-a-svc-file-write-to-asp-net-trace-axd