Wcfdualhttpbinding configuration of servers and clients deployed on different machine issues

Source: Internet
Author: User

<?xml version= "1.0" encoding= "Utf-8"?>

<configuration>

<startup>

<supportedruntime version= "v4.0" sku= ". netframework,version=v4.5 "/>

</startup>

<appSettings>

<add key= "Aspnet:usetaskfriendlysynchronizationcontext" value= "true"/>

</appSettings>

<system.web>

<compilation debug= "true"/>

</system.web>

<system.serviceModel>

<behaviors>

<serviceBehaviors>

<behavior name= "Myservicebehavior" >

<servicemetadata httpgetenabled= "true" httpsgetenabled= "true"/>

</behavior>

</serviceBehaviors>

</behaviors>

<bindings>

<wsDualHttpBinding>

<binding name= "dualhttpbinding" transactionflow= "true" maxreceivedmessagesize= "100000"

messageencoding= "Text" >

<security mode= "None" >

<message clientcredentialtype= "None" negotiateservicecredential= "false"/>

</security>

</binding>

</wsDualHttpBinding>

</bindings>

<services>

<service behaviorconfiguration= "Myservicebehavior" name= "service. MyPublisher ">

<endpoint address= "" binding= "wsdualhttpbinding" contract= "service. Imycontract "bindingconfiguration=" dualhttpbinding ">

<!--<identity>

<dns value= "localhost"/>

</identity>-->

</endpoint>

<!--<endpoint address= "Mex" binding= "mextcpbinding" contract= "IMetadataExchange"/>-->

<endpoint address= "Mex" binding= "mexHttpBinding" contract= "IMetadataExchange"/>

<baseAddresses>

<add baseaddress= "http://192.168.0.139:8899/"/>

</baseAddresses>

</service>

</services>

</system.serviceModel>

</configuration>


The above is the wsdualhttpbinding configuration file, wsdualhttpbinding is used to implement two-way communication. After the red part is added, the server and client software can be deployed on different machines (the blue part is removed).

If you do not have the following red section:

<security mode= "None" >

<message clientcredentialtype= "None" negotiateservicecredential= "false"/>

</security>

The client will receive the following exception error:

The caller was wasn't authenticated by the service.

Another thing to be aware of when deploying on different machines is: Turn off the firewall.


Wcfdualhttpbinding configuration of servers and clients deployed on different machine issues

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.