我是WCF和IIS的新手,但他正在阅读如何在IIS中托管WCF应用程序.我们有一个系统,我们试图部署到IIS,需要HTTP和NET.TCP端点.我在随机教程中看到了所有配置,但我仍然无法从我的客户端连接.任何有关配置的帮助将不胜感激!
我的WCF目录中的EdWCF.svc文件:
< %@ ServiceHost Language="C#" Debug="true" Service="TwoFour.WCF.Engine.EdWCF" % >
Run Code Online (Sandbox Code Playgroud)
我的Web.Config:
<?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>
Run Code Online (Sandbox Code Playgroud)
感谢您的任何帮助或建议!