我是 WCF 和 IIS 的新手,但一直在阅读有关如何在 IIS 中托管 WCF 应用程序的信息。我们有一个系统正在尝试部署到需要 HTTP 和 NET.TCP 端点的 IIS。我已经按照我在随机教程中看到的所有配置,但我仍然无法从我的客户端连接。任何有关配置的帮助将不胜感激!
我的 WCF 目录中的 EdWCF.svc 文件:
< %@ ServiceHost Language="C#" Debug="true" Service="TwoFour.WCF.Engine.EdWCF" % >
我的网络配置:
<?xml version="1.0"?>
<configuration>
<system.serviceModel>
<behaviors>
<serviceBehaviors>
<behavior name="MyBehaviour">
<serviceMetadata HttpGetEnabled="True" />
</behavior>
</serviceBehaviors>
</behaviors>
<service name="TwoFour.WCF.Engine.EdWCF" behaviorConfiguration="MyBehaviour">
<host>
<baseAddresses>
<add baseAddress="net.tcp://localhost:12345/WCF/EdWCF.svc"/>
</baseAddresses>
</host>
<endpoint address=""
binding="netTcpBinding"
bindingConfiguration="InsecureTcp"
contract="TwoFour.WCF.Interface.Shared.IEdWCF" />
<endpoint address="mexhttp" binding="mexHttpBinding" contract="IMetadataExchange"/>
</service>
<bindings>
<netTcpBinding>
<binding name="InsecureTcp" portSharingEnabled="true">
<security mode="None" />
</binding>
</netTcpBinding>
</bindings>
</system.serviceModel>
</configuration>
感谢您的任何帮助或建议!