WCF 服务器端App.config 配置
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.serviceModel>
<services>
<service name="Sercice.Service" behaviorConfiguration="calculatorBehavior" >
<host>
<baseAddresses>
<add baseAddress="http://localhost:8800"/>
</baseAddresses>
</host>
<endpoint address="" binding ="wsHttpBinding" contract="Contract.IService" ></endpoint>
<endpoint contract="IMetadataExchange" binding="mexHttpBinding" address="mex" />
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="calculatorBehavior">
<serviceMetadata httpGetEnabled="true" />
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
</configuration>
在部署WCF中,会碰到不同计算机无法访问的问题
在<endpoint>加入 bindingConfiguration="NoneSecurity"
在<system.serviceModel>节点中,加入下面代码
浙公网安备 33010602011771号