0

サーバーから Web クライアントにデータを送信する WCF REST サービスがあります。これらは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 への読み取り/書き込みがあります。

Web サイトからの同時呼び出しがある場合、asp.net はこれらの呼び出しをシリアル化します。これらを同時呼び出しとして使用するにはどうすればよいですか? この REST サービスのセッションへの読み取り/書き込みは、古いコードから引き継いだものであり、セッションの読み取り/書き込みを回避することは不可能です。

この問題を解決するためのこの/方向への解決策をいただければ幸いです.Thanks!

4

1 に答える 1

1

アプリケーションがセッション状態を使用する場合、アプリケーションへの呼び出しは常にシリアル化されます。

于 2012-10-25T19:10:30.060 に答える