简体   繁体   English

WCF,REST,并发,会话

[英]WCF, REST, Concurrency, Sessions

We have a WCF REST service that sends data from the server to the web client. 我们有一个WCF REST服务,该服务将数据从服务器发送到Web客户端。 These are the web.config settings 这些是web.config设置

    <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 web.config中的兼容模式-aspnetCompatibilitymode = true

The REST Service has read/writes into the HttpSession. REST服务已对HttpSession进行读/写。

When there are concurrent calls from the website, asp.net serializes these calls. 当有来自网站的并发呼叫时,asp.net会序列化这些呼叫。 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 对此REST服务的会话的读/写是我们从较早的代码中继承下来的,不可能绕过Session的读/写

Would appreciate a solution to this/direction to solve this problem.Thanks! 希望对此解决方案有一个解决方案。谢谢!

当应用程序使用会话状态时,对应用程序的调用始终被序列化。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM