我们有一个Windows服务,我们尝试将其用作WPF应用程序的WCF主机。它在开发中运行良好,但是当我们试图转移到我们的生产环境时,我们只有问题。通过阅读其他人的帖子,我们想出了如何打开WCF日志记录,这是一个很大的帮助。事实证明,我们对服务和客户端的安全绑定不匹配。我们将它们设置为使用Windows安全性但仍然没有运气现在我们正在尝试将安全模式设置为“无”但它仍然无效。这是我们的服务配置文件的绑定部分:
<system.serviceModel>
<bindings>
<netTcpBinding>
<binding name="netTcp">
<security mode='None'>
</security>
</binding>
</netTcpBinding >
</bindings>
<services>
<service name="CompanyService">
<endpoint
address= "our.url.com/CompanyService"
binding="netTcpBinding"
contract="CompanyServices.ICompanyService" />
</service>
</services>
</system.serviceModel>
以下是我们的客户端应用配置的serviceModel部分:
<system.serviceModel>
<bindings>
<netTcpBinding>
<binding name="NetTcpBinding_Config" >
<security mode="None">
</security>
</binding>
</netTcpBinding>
</bindings>
<client>
<endpoint address="our.url.com/CompanyService" binding="netTcpBinding" bindingConfiguration="NetTcpBinding_Config" contract="CompanyServiceProxy.ICompanyService" name="NetTcpBinding_ICompanyService" />
</client>
</system.serviceModel>
如果我需要提供额外的信息,请告诉我需要提供的信息。
由于
答案 0 :(得分:0)
标准net.tcp绑定默认使用Windows凭据,而那些确实要求客户端和服务位于同一Windows域中。这是这种情况吗?
好的,对不起,你提到security = None(你的列表格式不正确所以我只看到了实际配置的一小部分)。
我猜你的问题实际上在于使用的地址:
address= "our.url.com/CompanyService"
使用net.tcp绑定时,必须在地址之前指定,所以在客户端和服务器上将其更改为:
address= "net.tcp://our.url.com/CompanyService"
另外,我不太明白的是你的标题:它提到了“流媒体” - 你有没有在任何地方指定流媒体模式?在您的配置或服务合同中?
马克