0

我们有一个 WCF REST 服务,它将数据从服务器发送到 Web 客户端。这些是 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>

web.config 中的兼容模式 - aspnetCompatibilitymode = true

REST 服务已读取/写入 HttpSession。

当网站有并发调用时,asp.net 会序列化这些调用。我该怎么做才能将这些作为并发调用?对此 REST 服务的会话的读/写是我们从旧代码中继承下来的东西,不可能绕过会话读/写

将不胜感激这个/方向​​的解决方案来解决这个问题。谢谢!

4

1 回答 1

1

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

于 2012-10-25T19:10:30.060 回答