Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>The 5 connections probably comes from the server - you can define the number of maximum open sessions, max concurrent calls, and max server instances by means of the servers <code>serviceThrottling</code> behavior.</p> <p>At the same time, will this will allow you to increase the number of concurrently open sessions, I would still recommend to properly clean up after yourself - even if you didn't have to in the olden days.....</p> <p>I would suggest wrapping the use of your client proxy into a <code>using</code> statement like so:</p> <pre><code>using(ClientProxy proxy = new ClientProxy()) { // go ahead, call your service methods } </code></pre> <hr> <p><strong>Update:</strong> as a commentor has rightfully pointed out, this has it's share of problems, since the client might throw an exception upon being disposed. So this might not really work all that well - or you need to wrap a <code>try...catch</code> around it to handle those cases where the closing of the client proxy causes an issue.</p> <p>See <a href="http://msdn.microsoft.com/en-us/library/aa355056.aspx" rel="nofollow noreferrer">Avoiding Problems with the Using Statement</a> </p> <hr> <p>That way, the client proxy is automatically closed and disposed of when the scope of the using block ends, and your channel from the client to the server is released and the server is ready to receive another call from another client.</p> <p>Also with the wsHttpContextBinding you should check whether you really need the sessions that are on by default - the recommended best practice would be to use per-call instancing on the server, e.g. each caller instantiates a new server object. Sessions introduce a whole slew of new problems and potential pitfalls, so I would try to only use them when I really really have to (and get a benefit from it) - otherwise turn off sessions.</p> <p>Marc</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