当我右键单击 if 并选择 UpdateServiceReference 时,我的一项服务已开始添加额外的 HTTP 端点。这会导致运行时错误,说我有重复的端点并且必须按名称指定一个。我现在手动删除端点,但我想停止这个。我只想要 TCP 端点。
这是服务,下面是“额外”端点
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="BasicHttpBinding_IEmail" />
</basicHttpBinding>
<netTcpBinding>
<binding name="tcpConfig" receiveTimeout="00:10:00" maxBufferPoolSize="5242880"
maxBufferSize="1048576" maxReceivedMessageSize="1048576" />
</netTcpBinding>
</bindings>
<behaviors>
<serviceBehaviors>
<behavior>
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="false" />
</behavior>
<behavior name="NotificationBehavior">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="false" />
</behavior>
</serviceBehaviors>
</behaviors>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
<services>
<service behaviorConfiguration="NotificationBehavior" name="PGFContracts.LiveContractsService.LiveTargetPriceAgreementService">
<endpoint address="LivePricing" binding="netTcpBinding" bindingConfiguration="tcpConfig"
name="TCPLivePricing" contract="PGFContracts.LiveTargetPriceAgreementService.ILivePricing" />
<endpoint address="TpaNotification" binding="netTcpBinding" bindingConfiguration="tcpConfig"
name="TCPTpaNotification" contract="PGFContracts.LiveTargetPriceAgreementService.ITargetPriceAgreementNotification" />
<host>
<baseAddresses>
<add baseAddress="net.tcp://localhost:8020" />
</baseAddresses>
</host>
</service>
</services>
这些是我不想要的端点,net.tcp 也正确生成。它是服务器上的 IIS 设置吗?
<endpoint address="http://xxx:8083/LiveTargetPriceAgreement/LiveTargetPriceAgreementService.svc"
binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_ILivePricing"
contract="LiveTPAService.ILivePricing" name="BasicHttpBinding_ILivePricing" />
<endpoint address="http://xxx:8083/LiveTargetPriceAgreement/LiveTargetPriceAgreementService.svc"
binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_ITargetPriceAgreementNotification"
contract="LiveTPAService.ITargetPriceAgreementNotification"
name="BasicHttpBinding_ITargetPriceAgreementNotification" />