我已经安装并运行了一个自托管的win服务WCF。
当然,我不得不做出一些改变。所以我将基地址更改回本地工作站并进行了更改。它运作良好。
现在是重新分配的时候了......嗯......它一直在流淌,我无法弄明白。
从app.config文件:
<system.serviceModel>
<services>
<service behaviorConfiguration="ExStreamWCF.Service1Behavior"
name="ExStreamWCF.Service1">
<endpoint address="" binding="netTcpBinding" bindingConfiguration=""
contract="ExStreamWCF.IService1">
<identity>
<dns value="Devexstream-2" />
<!--<dns value="vmwin2k3sta-tn2" />-->
</identity>
</endpoint>
<endpoint address="mex" binding="mexTcpBinding" bindingConfiguration=""
contract="IMetadataExchange" />
<host>
<baseAddresses>
<add baseAddress="net.tcp://Devexstream-2:8080/Service" />
<!--<add baseAddress="net.tcp://vmwin2k3sta-tn2:8080/Service" />-->
</baseAddresses>
</host>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="ExStreamWCF.Service1Behavior">
<serviceMetadata httpGetEnabled="false" />
<serviceDebug includeExceptionDetailInFaults="true" />
</behavior>
</serviceBehaviors>
</behaviors>
来自web.config文件(长篇故事):
<system.serviceModel>
<services>
<service behaviorConfiguration="ExStreamWCF.Service1Behavior"
name="ExStreamWCF.Service1">
<endpoint address="" binding="netTcpBinding" bindingConfiguration=""
contract="ExStreamWCF.IService1">
<identity>
<dns value="Devexstream-2" />
<!--<dns value="vmwin2k3sta-tn2" />-->
</identity>
</endpoint>
<endpoint address="mex" binding="mexTcpBinding" bindingConfiguration=""
contract="IMetadataExchange" />
<host>
<baseAddresses>
<add baseAddress="net.tcp://Devexstream-2:8080/Service" />
<!--<add baseAddress="net.tcp://vmwin2k3sta-tn2:8080/Service" />-->
</baseAddresses>
</host>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="ExStreamWCF.Service1Behavior">
<serviceMetadata httpGetEnabled="false" />
<serviceDebug includeExceptionDetailInFaults="true" />
</behavior>
</serviceBehaviors>
</behaviors>
我猜错了什么?
答案 0 :(得分:3)
感谢masr,这是一个配置错误的SPN。
太糟糕了,这个网站没有关闭你自己的问题的功能,我将需要等待2天才能选择这个: - )
再次感谢!
答案 1 :(得分:2)
当我没有连接到域时,我从配置中删除了身份元素以进行本地测试。它有效。
参考 -
答案 2 :(得分:1)
under the <system.serviceModel>
<bindings>
<netTcpBinding>
<binding name="netTcp">
<security mode="None">
</binding>
</netTcpBinding>
</bindings>
将此添加到端点中的bindingConfiguration
ref:https://www.youtube.com/watch?v=KYDBjoCYAC4&list=PL6n9fhu94yhVxEyaRMaMN_-qnDdNVGsL1&index=53
答案 3 :(得分:0)
检查是否安装了框架,应使用框架4.5.x。它可能已升级。恢复旧版本即可使用。