Sunday, April 18, 2010

svc logging

Service not found exeception is quite annoying in silverlight when calling wcf services. Usually this happens when unhandled exceptions are thrown. One easy way to find out what's wrong is to enable logging of svc web services in IIS. Just paste code below in web.config. A new file with .svclog will be placed in root of virtual folder running these services.

Also you can check here for more details. You can find it in C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin\SvcTraceViewer.exe or C:\Program Files\Microsoft SDKs\Windows\v6.1\Bin\SvcTraceViewer.exe.



<diagnostics>
<messageLogging logEntireMessage="true" logMalformedMessages="true" logMessagesAtServiceLevel="true" maxMessagesToLog="3000" maxSizeOfMessageToLog="2000" />
</diagnostics>
</system.serviceModel>
<system.diagnostics>
<sources>
<source name="System.ServiceModel.MessageLogging">
<listeners>
<add name="messages" type="System.Diagnostics.XmlWriterTraceListener" initializeData="messages.svclog" />
</listeners>
</source>
</sources>
</system.diagnostics>




kick it on DotNetKicks.com