Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>One of the easiest areas to lose lots of time on while developing WCF services is in binding configuration. Backup your working configs religiously, for starters, in the source code repository. You may also want to add a validation routine for config file itself that runs prior to service creation. </p> <p>As far as debugging such WCF issues, there really is no substitute for the good old Trace.WriteLine() that write to a TraceListener that is mapped to a file, on the service and in the client. But really, considering your issue is rather common and is most likely 100% config-related, I would suggest learning more about the binding settings, particularly timeouts. Set values to arbitrarily high numbers or even to the Timeout.Infinite numeric value (as a string), which will literally tell WCF to allow for an infinite timeout. Then, ask yourself, why something would be timing out that does not do so with just a slight change in the binding. </p> <p>Regarding you specific issue, it is possible that sessions are not being terminated properly because client proxies are not being closed properly by calling the Close() method explicitly. You might be able to get away with this when you are dealing with sessionless bindings, but sessions will not be released unless you close the proxy. The side effect of this would be that the default service throttling values of usually 10 concurrent sessions will be reached. Once you understand the life cycle of a session, you might want to look into the IsInitiating, IsTerminating and IsOneWay properties that can be specified for OperationContract attributes on the methods of the service contract.</p> <p>Here are a few useful resources:</p> <p>OperationContract: (strange url that won't link)<BR> <a href="http://en.csharp-online.net/WCF_Services%E2%80%94OperationContract_Attribute" rel="nofollow noreferrer"><a href="http://en.csharp-online.net/WCF_Services" rel="nofollow noreferrer">http://en.csharp-online.net/WCF_Services</a>—OperationContract_Attribute</a></p> <p>Using Sessions:<BR> <a href="http://msdn.microsoft.com/en-us/library/ms733040.aspx" rel="nofollow noreferrer">http://msdn.microsoft.com/en-us/library/ms733040.aspx</a></p> <p>A Handy Summary of WCF sessions, instancing, and reliable messaging<BR> <a href="http://www.pluralsight.com/community/blogs/aaron/archive/2006/02/27/19253.aspx" rel="nofollow noreferrer">http://www.pluralsight.com/community/blogs/aaron/archive/2006/02/27/19253.aspx</a></p> <p>And, as mentioned by Brian, my response to a throttling question:<BR> <a href="https://stackoverflow.com/questions/480020/wcf-service-throttling">WCF Service Throttling</a></p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload