Question

We have a WCF REST service that sends data from the server to the web client. These are the web.config settings

    <binding name="Binding_Service_Name"
      closeTimeout="00:01:30" openTimeout="00:01:30" receiveTimeout="00:01:30"
      sendTimeout="00:01:30" allowCookies="false" bypassProxyOnLocal="false"
      hostNameComparisonMode="StrongWildcard" maxBufferSize="1048576"
      maxBufferPoolSize="524288" maxReceivedMessageSize="1048576" messageEncoding="Text"
      textEncoding="utf-8" transferMode="Buffered" useDefaultWebProxy="true"> 

   <client>
     <endpoint address="https://FQDN//RESTService.svc"
       binding="basicHttpBinding" bindingConfiguration="Binding_Service_Name"
       contract="Contract"
       name="BindingName" />
    </client> 

<services>
      <service behaviorConfiguration="RESTServiceBehavior"
        name="Name">
          <endpoint address="" behaviorConfiguration="webBehavior" binding="customBinding" 
           bindingConfiguration="jsonpBinding" contract="contract">
        </endpoint>
        <!--<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />    jsonpBinding-->
      </service>
<serviceBehaviors>
        <behavior name="Bco.Sitecore.UI.RESTApi.RESTServiceBehavior">
          <!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment -->
          <!--HTTPS-->
          <!--<serviceMetadata httpsGetEnabled="true"/>-->
          <!--HTTP-->
          <serviceMetadata httpGetEnabled="true" />
          <!-- To receive exception details in faults for debugging purposes, set the value below to true.  Set to false before deployment to avoid disclosing exception information -->
          <serviceDebug includeExceptionDetailInFaults="true"/>
          <serviceThrottling maxConcurrentCalls="1000" maxConcurrentInstances="1000" maxConcurrentSessions="1000" />
        </behavior>
</serviceBehaviors>

Compatibility mode in web.config - aspnetCompatibilitymode = true

The REST Service has read/writes into the HttpSession.

When there are concurrent calls from the website, asp.net serializes these calls. What do I do to have these as concurrent calls? Read/writes to the session for this REST service is something we carried over from our older code and it's impossible to get around the Session Read/Writes

Would appreciate a solution to this/direction to solve this problem.Thanks!

Was it helpful?

Solution

When an application uses session state, calls to the application are always serialized.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top