title: Can I create a WCF where multiple calls are not blocking each other
body: <p>I have a WebAPI application that is calling through to a WCF service using an HTTP connection.  The call to the WebAPI is coming from a users browser.  The WCF service is being hosted in a separate IIS application.</p>
  
  <p>Due to some legacy code, one of the methods in the WCF service is a long running process e.g. 30 seconds and it produces a large byte array that we then get back and can pass on.</p>
  
  <p>There is also another method that is not a long running process and should return instantly.  However whilst the client is calling the long process, the other method is blocked from completing until the long process is finished.</p>
  
  <p>I have tried lots of things like adding the following to the service:</p>
  
  <pre><code>[ServiceBehavior(ConcurrencyMode = ConcurrencyMode.Multiple, InstanceContextMode=InstanceContextMode.PerCall)]
  </code></pre>
  
  <p>and adding the following to the config:</p>
  
  <pre><code>  &lt;system.net&gt;
      &lt;connectionManagement&gt;
        &lt;add address = "*" maxconnection = "100" /&gt;
      &lt;/connectionManagement&gt;
    &lt;/system.net&gt;
  </code></pre>
  
  <p>And turned off Session State:</p>
  
  <pre><code>&lt;sessionState mode="Off" /&gt;
  </code></pre>
  
  <p>However, I have not been able to get these calls to work in parallel.  I understand that it is something to do with the way that WCF services protect against Session issues but I have turned off <code>aspNetCompatibilityEnabled</code> and I don't use the HttpContext Session or Cache so I am not sure what is causing the block.</p>
  
  <p>Any ideas on what I can do to get these calls to work in parallel without major re-work to them?</p>