0
我們有一個WCF REST服務,用於將數據從服務器發送到Web客戶端。這些是web.config設置WCF,REST,併發性,會話
<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 =真
REST服務具有讀/寫入HttpSession中。
當來自網站的併發呼叫時,asp.net將這些呼叫序列化。我該怎麼做才能將這些視爲併發呼叫?讀/寫這個REST服務的會話是我們從舊代碼繼承的東西,它不可能避開會話讀/寫
希望能解決這個問題的解決方案。謝謝!
我試着刪除會話寫入,仍然是通話被阻止。打開aspnetCompatibilitymode = false會使調用並行。任何關於這個的指針? –
我不確定,但請參閱http://msdn.microsoft.com/en-us/library/ms733040.aspx。 –