This question came up from what I see on a clients side: Intermittent Connection Reset by Peer errors in Android connecting to .NET REST endpoint
Simply put, I suspect that my WCF service for some reason intermittenly reject clients. I wonder if there is any way to log those rejections? I’m not even sure if that happens on WCF level, maybe it happens in IIS itself before routed to WCF?
I want to know how to log any errors for requests coming to my WCF endpoint. Inside WCF there is no issues, I log any kind of exceptions thrown.
As you can see on this link:
http://msdn.microsoft.com/en-us/library/ms733025.aspx
using system.diagnostics section of config you can configure your service to trace all action executed to complete an operation.
This parameter: initializeData= “c:\log\Traces.svclog” />
is the file location where trace information will be saved.