使用netmsmq和webhttpbinding端点的wcf服务

时间:2016-05-30 05:58:44

标签: vb.net wcf

我有一个带有多个端点的WCF服务,一个是netmsmqbinding,另一个是webhttpbinding,当我尝试浏览我收到的服务时出现以下错误“合同需要TwoWay(请求 - 回复或双工),但是绑定” NetMsmqBinding'不支持它或未正确配置以支持它。“我添加了[OperationContract(IsOneWay = true)] void myMethod(YourClass objectHere)到我的netmsmq方法和第二个方法[OperationContract()] void mymethod()仍然得到相同的错误。

以下是我的终点

如果我错过了什么,请告诉我。

<service behaviorConfiguration="UpdateShipmentStatus" name="mydomian.UpdateShipmentStatus">

        <endpoint name="webHttpBinding" address="" behaviorConfiguration="webHttp" binding="webHttpBinding" bindingConfiguration="UpdateShipmentStatus" contract="mydomian.IUpdateShipmentStatus"></endpoint>

        <endpoint address="net.msmq://localhost/private/UpdateShipmentStatus.svc" binding="netMsmqBinding" bindingConfiguration="NetMsmqBinding_IUpdateShipmentStatus" contract="mydomian.IUpdateShipmentStatus"/>

    <endpoint name="mexHttpBinding" address="mex" binding="mexHttpBinding" contract="IMetadataExchange"></endpoint>

        <host>
          <baseAddresses>
           <add baseAddress="http://mydomian.com/xyz/UpdateShipmentStatus.svc" />
            <add baseAddress="net.msmq://localhost/private/UpdateShipmentStatus.svc" />
          </baseAddresses>
        </host>
      </service> 

    bindings

    <binding name="NetMsmqBinding_IUpdateShipmentStatus"  closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" deadLetterQueue="System" durable="true" exactlyOnce="false" maxReceivedMessageSize="65536" maxRetryCycles="2" receiveErrorHandling="Fault" receiveRetryCount="5" retryCycleDelay="00:30:00" timeToLive="1.00:00:00" useSourceJournal="false" useMsmqTracing="false" queueTransferProtocol="Native" maxBufferPoolSize="524288" useActiveDirectory="false">
          <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384" />
          <security mode="None">
            <transport msmqAuthenticationMode="WindowsDomain" msmqEncryptionAlgorithm="RC4Stream" msmqProtectionLevel="Sign" msmqSecureHashAlgorithm="Sha1" />
            <message clientCredentialType="Windows" />
          </security>
        </binding>
        <binding name="UpdateShipmentStatus" closeTimeout="10:00:00" openTimeout="10:00:00" receiveTimeout="10:00:00" sendTimeout="10:00:00" maxBufferSize="2147483647" maxBufferPoolSize="9223372036854775807" maxReceivedMessageSize="9223372036854775807" transferMode="Streamed">
    <readerQuotas maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
          <security mode="None" />
        </binding>

绑定MSMQ:

 <binding name="NetMsmqBinding_IUpdateShipmentStatus" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" >

  <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384" /> <security mode="None"> 

     <transport msmqAuthenticationMode="WindowsDomain" msmqEncryptionAlgorithm="RC4Stream" msmqProtectionLevel="Sign" msmqSecureHashAlgorithm="Sha1" />

 <message clientCredentialType="Windows" /> </security> </binding> 

0 个答案:

没有答案