我正在尝试在 WAS 和 IIS 中为 http 和 net.tcp 托管我的 WCF 4 Web 服务。是否可以删除 net.tcp 绑定的 .svc 扩展名?
如果我执行以下操作,我会收到错误
在 net.tcp://myserver.com/service/TestService 上没有可以接受消息的端点监听。这通常是由不正确的地址或 SOAP 操作引起的。有关更多详细信息,请参阅 InnerException(如果存在)。
<system.serviceModel>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true">
<serviceActivations>
<add relativeAddress="TestService.svc" service="Web.TestService"/>
</serviceActivations>
</serviceHostingEnvironment>
<services>
<service name="Web.TestService" behaviorConfiguration="WebService">
<host>
<baseAddresses>
<add baseAddress="http://myserver.com/service/" />
</baseAddresses>
</host>
<endpoint address="" contract="Web.ITestService" binding="basicHttpBinding"></endpoint>
<endpoint address="net.tcp://myserver.com:808/service/TestService" contract="Web.ITestService" binding="netTcpBinding"></endpoint>
<endpoint address="net.tcp://myserver.com:808/service/TestService/mex" binding="mexTcpBinding" bindingConfiguration="" contract="IMetadataExchange"></endpoint>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="WebService">
<serviceMetadata httpGetEnabled="true"/>
<serviceDebug includeExceptionDetailInFaults="false"/>
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>