我在自己的计算机上自托管WCF服务。这是.config:
<system.serviceModel>
<behaviors>
<serviceBehaviors>
<behavior name="name">
<serviceMetadata httpGetEnabled="true" />
</behavior>
</serviceBehaviors>
</behaviors>
<services>
<service name="Namespace.Name" behaviorConfiguration="name">
<host>
<baseAddresses>
<add baseAddress="http://xxx.xxx.108.185:8888/MyService/"/>
</baseAddresses>
</host>
<endpoint address="" binding="basicHttpBinding" contract="Namespace.IName" />
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
</service>
</services>
我可以从同一台机器上访问它而没有任何问题,但我还需要从另一台机器(在同一个wifi上)访问它。
另一台机器的错误是:
There was no endpoint listening at "http://xxx.xxx.108.185:8888/MyService/" that could accept the message.
有人可以帮助我,我一直在浏览这个网站好几天没有成功,我只需要两台电脑之间的简单连接......