【问题标题】:"There is no compatible TransportManager found" error for net.tcp WCF service (mex endpoint) on IIS 7IIS 7 上 net.tcp WCF 服务(mex 端点)的“找不到兼容的 TransportManager”错误
【发布时间】:2012-07-26 02:32:44
【问题描述】:

我使用以下配置创建了服务

<system.serviceModel>

<bindings>
  <netTcpBinding>

    <binding name="CommonUserNameBinding" maxConnections="1000" portSharingEnabled="True">
      <security mode="None">
      </security>
    </binding>

  </netTcpBinding>

</bindings>


<serviceHostingEnvironment multipleSiteBindingsEnabled="true" />

<services>
  <service name="MyNameSpace.SimplePluginService" behaviorConfiguration="CommonBehavior">

    <endpoint address="UserName"
              binding="netTcpBinding" 
              bindingConfiguration="CommonUserNameBinding" 
              name="MyNameSpace.Contracts.ISimplePluginServiceUserName" 
              contract="MyNameSpace.Contracts.ISimplePluginService">
      <identity>
        <dns value="WCfServer" />
      </identity>
    </endpoint>

    <endpoint address="mex" binding="mexTcpBinding" contract="IMetadataExchange"  />

    <host>
      <baseAddresses>
        <add baseAddress="net.tcp://localhost:5812/Service/SimplePluginService.svc"/>
      </baseAddresses>
    </host>

  </service>
</services>


<behaviors>

  <serviceBehaviors>
    <behavior name="CommonBehavior">
      <serviceMetadata httpGetEnabled="True" policyVersion="Policy15" />
      <serviceDebug includeExceptionDetailInFaults="True"/>
        <serviceCredentials>

        <userNameAuthentication 
            userNamePasswordValidationMode="Custom"
            customUserNamePasswordValidatorType="Megatec.MasterTourService.CustomUserNameValidator, Megatec.MasterTourService"/>

        <serviceCertificate
            findValue="WCFServer"
            storeLocation="LocalMachine"
            storeName="My"
            x509FindType="FindBySubjectName"/>

        <clientCertificate>
          <authentication certificateValidationMode="PeerTrust" />
        </clientCertificate>

      </serviceCredentials>  
    </behavior>
  </serviceBehaviors>

</behaviors>

</system.serviceModel>

</configuration>

我在本地 IIS 7.5 上调试它。站点和应用程序在活动协议列表中有“net.tcp”。

net.tcp 的 IIS 绑定是 5812:*

我遇到以下错误

没有为 URI 'net.tcp://myComputerName:5812/Service/SimplePluginService.svc/mex' 找到兼容的 TransportManager。这可能是因为您使用了指向虚拟应用程序之外的绝对地址,或者端点的绑定设置与其他服务或端点设置的不匹配。请注意,同一协议的所有绑定在同一应用程序中应具有相同的设置。

我已阅读以下问题 No compatible TransportManager error,但它对我不起作用。

更新。 问题与 mex 端点有关。

我可以为服务创建不同的端点(具有不同的绑定和身份验证类型),但 mex 端点使用 TransportManager 出错。

根据我的测试,它不依赖于行为和安全模式(在绑定部分)。

那么,mex 端点有什么问题?

【问题讨论】:

标签: .net wcf net.tcp


【解决方案1】:

在我的例子中,将 netTcpBinding 的 maxConnections 设置为 10 会有所帮助。

我不知道为什么...如果有人解释一下就好了。 :)

【讨论】:

    【解决方案2】:

    省略endpoint 标记的address="UserName" 属性,因为这将在IIS 控制台中进行配置。该消息本身具有误导性,但您不应与 IIS 一起定义地址。

    【讨论】:

      【解决方案3】:

      我不知道为什么,但是在绑定上设置 maxConnections 会导致我们的服务无法激活,并出现与您相同的错误(在 mex 端点上)。

      删除 maxConnection 属性为我们完全修复了它。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2012-01-21
        • 1970-01-01
        • 1970-01-01
        • 2015-03-06
        • 2011-10-24
        • 2019-12-10
        • 1970-01-01
        • 2013-09-10
        相关资源
        最近更新 更多