简体   繁体   English

在Azure下部署时wsDualHttpBinding不起作用

[英]wsDualHttpBinding Not Working When Deployed Under Azure

WCF Duplex not working under Azure. WCF双工无法在Azure下运行。 Everything works fine under IIS Express. 在IIS Express下一切正常。 I know duplex binding is problematic because of the server callback, but.... I already shut down my firewall. 我知道双工绑定由于服务器回调而出现问题,但是....我已经关闭了防火墙。 TCPView (Sysinternals) shows 10 to 12 packets being sent/received by the client and then it just dies... nothing happens. TCPView(Sysinternals)显示客户端正在发送/接收10到12个数据包,然后它死了……什么也没发生。 I set to 10 minutes all timeouts i could. 我将所有超时设置为10分钟。

Please see my config files below. 请在下面查看我的配置文件。

SERVER CONFIG: 服务器配置:

  <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" />

CLIENT CONFIG: 客户配置:

    <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>

I knew this wsDualHttpBinding didn't pass the "smell test".... From Juval Lowy's book, "Programming WCF Services: Mastering WCF and the Azure AppFabric Service Bus": 我知道这个wsDualHttpBinding没有通过“气味测试”。...从Juval Lowy的书中,“对WCF服务进行编程:掌握WCF和Azure AppFabric服务总线”:

...the WSDualHttpBinding is mostly unusable, since it is practically impossible to tunnel through various communication barriers separating the service from the client and the need to find a specific web-server machine makes this impractical. WSDualHttpBinding几乎是不可用的,因为实际上不可能穿越各种将服务与客户端隔离开的通信障碍,并且需要找到特定的Web服务器机器使这不切实际。

I solved my problem by simply using netTcpBinding instead.... You just need to get IIS to work with TCP protocol. 我通过简单地使用netTcpBinding来解决了我的问题。...您只需要使 IIS可以使用TCP协议即可。 There's plenty of articles out there explaining how to do it. 那里有很多文章解释如何做。 Here's one: http://msdn.microsoft.com/en-us/library/ms731053.aspx 这是一个: http : //msdn.microsoft.com/en-us/library/ms731053.aspx

Cheers. 干杯。

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

相关问题 Web api在本地工作,但在部署到Azure时则不能 - Web api working locally but not when deployed to Azure 部署到天蓝色的Google身份验证不起作用 - Google authentication not working when deployed to azure 部署到Azure ASP MVC 4时捆绑不起作用 - Bundling not working when deployed to azure asp mvc 4 部署到Azure网站时WebApi不工作 - WebApi Not Working When Deployed to Azure Website Azure Function 事件中心 Output 绑定在部署时不起作用 - Azure Function Event Hub Output Binding not working when deployed Azure AD图形api在本地工作但在部署时失败 - Azure AD graph api working on local but fails when deployed Identity Server 4部署到Azure网站时无法正常工作 - Identity Server 4 not working when deployed to Azure Web Site Windows Azure VM上的WCF wsdualhttpbinding绑定 - WCF wsdualhttpbinding binding on Windows Azure VM 尽管在本地主机上工作,但在部署到Azure时,Azure Active Directory始终会重定向到“〜/ .auth / login / done” - Azure Active Directory always redirects to '~/.auth/login/done' when deployed to Azure despite working on localhost 部署在Azure中但无法通过VS仿真器工作时,文件不会复制到流中 - File not copying to stream when deployed in Azure, yet working through VS emulator
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM