2

I've created service with the following config

<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>

I debug it on local IIS 7.5. Site and application have "net.tcp" in the Active protocols list.

The IIS Binding for net.tcp is 5812:*

I've got the following error

There is no compatible TransportManager found for URI 'net.tcp://myComputerName:5812/Service/SimplePluginService.svc/mex'. This may be because that you have used an absolute address which points outside of the virtual application, or the binding settings of the endpoint do not match those that have been set by other services or endpoints. Note that all bindings for the same protocol should have same settings in the same application.

I've read the following questions No compatible TransportManager error, but it doesn't work for me.

UPDATE. The problem is connected with mex endpoint.

I can create different endpoint for the service (with different binding and auth types), but mex endpoint made the error with TransportManager.

It doesn't depends on behaviour and security mode (in binding section) according to my tests.

So, what is wroung with mex endpoint?

Community
  • 1
  • 1
Sir Hally
  • 2,318
  • 3
  • 31
  • 48
  • Just in case someone, like me, gets here: http://stackoverflow.com/questions/3689008/wcf-maxconnections-property – Rodrigo Sep 20 '16 at 14:48

3 Answers3

5

In my case setting maxConnections of netTcpBinding to 10 helps.

I don't know why... It would be great if somebody explain. :)

Eugene
  • 389
  • 1
  • 7
  • 18
2

Leave out the address="UserName" property of your endpoint tag because this will be configured within the IIS console. The message itself is misleading, but in conjunction with the IIS you should not define an address.

Matten
  • 17,365
  • 2
  • 42
  • 64
2

I'm not sure why, but setting maxConnections on the binding caused our service to fail to activate with the same error as you (on the mex endpoint).

Removing the maxConnection attribute altogether fixed it for us.

Drew Delano
  • 1,421
  • 16
  • 21