[英]wsDualHttpBinding Not Working When Deployed Under Azure
WCF雙工無法在Azure下運行。 在IIS Express下一切正常。 我知道雙工綁定由於服務器回調而出現問題,但是....我已經關閉了防火牆。 TCPView(Sysinternals)顯示客戶端正在發送/接收10到12個數據包,然后它死了……什么也沒發生。 我將所有超時設置為10分鍾。
請在下面查看我的配置文件。
服務器配置:
<system.serviceModel>
<services>
<service behaviorConfiguration="MexBehaviour" name="MySrvc">
<endpoint address="" binding="wsDualHttpBinding" bindingConfiguration="wsDualHttpBinding"
name="wsDualEndpoint" bindingName="wsDualHttpBinding" contract="IMySrvc" />
<endpoint address="mex" binding="mexHttpBinding" bindingConfiguration="mexHttpBinding"
name="MexEndpoint" bindingName="mexHttpBinding" contract="IMetadataExchange" />
<host>
<baseAddresses>
<add baseAddress="http://srvc.azurewebsites.net/MySrvc.svc" />
</baseAddresses>
<timeouts openTimeout="00:10:00" />
</host>
</service>
</services>
<bindings>
<wsDualHttpBinding>
<binding name="wsDualHttpBinding" openTimeout="00:10:00" sendTimeout="00:10:00"
clientBaseAddress="http://xxx.xxx.xxx.xxx:xxx">
<security mode="None">
<message clientCredentialType="None" negotiateServiceCredential="false" />
</security>
</binding>
</wsDualHttpBinding>
<mexHttpBinding>
<binding name="mexHttpBinding" />
</mexHttpBinding>
</bindings>
<behaviors>
<serviceBehaviors>
<behavior name="MexBehaviour">
<serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="false" />
</behavior>
</serviceBehaviors>
</behaviors>
<protocolMapping>
<add binding="basicHttpsBinding" scheme="https" />
</protocolMapping>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
客戶配置:
<system.serviceModel>
<bindings>
<wsDualHttpBinding>
<binding name="wsDualEndpoint">
<security mode="None" />
</binding>
</wsDualHttpBinding>
</bindings>
<client>
<endpoint address="http://srvc.azurewebsites.net/MySrvc.svc"
binding="wsDualHttpBinding" bindingConfiguration="wsDualEndpoint"
contract="SrvcRef.IMySrvc" name="wsDualEndpoint" />
</client>
</system.serviceModel>
我知道這個wsDualHttpBinding沒有通過“氣味測試”。...從Juval Lowy的書中,“對WCF服務進行編程:掌握WCF和Azure AppFabric服務總線”:
WSDualHttpBinding幾乎是不可用的,因為實際上不可能穿越各種將服務與客戶端隔離開的通信障礙,並且需要找到特定的Web服務器機器使這不切實際。
我通過簡單地使用netTcpBinding來解決了我的問題。...您只需要使 IIS可以使用TCP協議即可。 那里有很多文章解釋如何做。 這是一個: http : //msdn.microsoft.com/en-us/library/ms731053.aspx
干杯。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.