这段时间在学WCF,写了个WCF装载到windwos服务,服务已经能够启用了,我想在本地引用这个wcf服务测试,但是一直连接不上配置如下:
<system.serviceModel>
<bindings>
<netTcpBinding>
<binding name="tcpBinding" transferMode="Buffered" maxBufferSize="524288"
maxReceivedMessageSize="524288">
<security mode="None">
<transport clientCredentialType="None" protectionLevel="None" />
<message clientCredentialType="None" />
</security>
</binding>
</netTcpBinding>
</bindings>
<behaviors>
<serviceBehaviors>
<behavior name="mexBehavior">
<serviceMetadata />
<serviceThrottling maxConcurrentCalls="100" maxConcurrentInstances="100" />
</behavior>
</serviceBehaviors>
</behaviors>
<services>
<service behaviorConfiguration="mexBehavior" name="Demo.ServicePro">
<endpoint address="net.tcp://localhost:9815" binding="netTcpBinding"
bindingConfiguration="tcpBinding" name="DemoService" contract="Demo.IServicePro" />
<endpoint address="net.tcp://localhost:9816" binding="mexTcpBinding"
bindingConfiguration="" name="mex" contract="IMetadataExchange" />
</service>
</services>
</system.serviceModel>
请问各位大神,是不是这个配置写错了,还是引用时候时候还有其他需要设置的
------解决方案--------------------
config文件基本不需要更改
客户端添加服务引用
------解决方案--------------------
我也遇到这个问题,顶一下。。。。现在正在需求解决方法