IIS handling WCF web method multiple times
I have problem with WCF web service, especially with web method. I call it from c# client with normal HttpRequest and in IIS logs it seems URL is called only one time but from logs I see that method handling request is cal开发者_如何学运维led multiple times. Do you have any clue why something like this might happen?
I had a similar problem with my WCF service (httpBinding) the service was called from a client application only once, yet the server method was called multiple times and every time the method itself finished ok so I figured there must be some problem with the network communication.
I found a way to debug it by enabling tracing in web.config
<system.diagnostics>
<sources>
<source name="System.ServiceModel" switchValue="Information, ActivityTracing" propagateActivity="true">
<listeners>
<add name="traceListener" type="System.Diagnostics.XmlWriterTraceListener" initializeData="d:\logs\Traces.svclog"/>
</listeners>
</source>
</sources>
</system.diagnostics>
When I looked at the trace log file, it turned out I had a problem with serialization of one of my classes.
精彩评论