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?
In my case setting maxConnections of netTcpBinding to 10 helps.
I don't know why... It would be great if somebody explain. :)