繁体   English   中英

WCF-无法停止net.tcp绑定(托管在IIS上)

[英]WCF - unable to stop net.tcp binding (hosted on IIS)

我在配置了net.tcp终结点的IIS上使用了WCF服务。 在IIS上禁用页面后,我仍然可以运行对服务oO的请求。 禁用应用程序池按预期工作(服务不再可用)。

<system.serviceModel>
    <services>
      <service name="xyz.Service.Authentication.Implementation.AuthenticationService">
        <endpoint binding="netTcpBinding"
                  bindingConfiguration="NetTcpBinding"
                  contract="xyz.Service.Authentication.Model.IAuthenticationService"/>
      </service>
    </services>
    <bindings>
      <netTcpBinding>
        <binding name="NetTcpBinding" sendTimeout="00:00:30" 
                 transactionFlow="false" 
                 portSharingEnabled="false"
                 maxReceivedMessageSize="18000">
          <security mode="Transport">
            <transport clientCredentialType="Windows" protectionLevel="Sign"/>
          </security>
        </binding>
      </netTcpBinding>
    </bindings>
    <behaviors>
      <serviceBehaviors>
        <behavior>
          <serviceAuthorization principalPermissionMode="UseWindowsGroups"/>
          <serviceDebug includeExceptionDetailInFaults="true"/>
          <serviceMetadata httpGetEnabled="true" httpsGetEnabled="true"/>
        </behavior>
      </serviceBehaviors>
    </behaviors>
  </system.serviceModel>

它是错误还是功能?

我有类似的问题,我发现:

  • 停止Web站点不会停止的net.tcp服务
  • 禁用应用程序池禁用服务,但释放该端口,端口仍然被SMSvcHost.exe
  • 之后重启也无济于事。

释放端口(供其他人使用)的唯一方法是删除 IIS中的net.tcp绑定

我花了一些时间,因为从net.tcp服务收到了错误的答案。 我花了一段时间才知道-这不是我的服务,而是老残障人士的服务。 这样可以节省时间。

删除net.tcp绑定

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM