Scenario:
While trying to connect to WCF endpoint you got following error :
Error : The requested upgrade is not supported by 'net.tcp://servername:8080/ServiceName/mex'. This could be due to mismatched bindings (for example security enabled on the client and not on the server).
Solution:
-- Try to connect to WCF endpoint by adding a service reference using Visual Studio
-- Make sure service host is running.
-- Make sure the Configuration is same on both side ( server and client )
-- Try turning off security mode = None (case sensitive) as shown below (This may not be the best solution)
Code:
<bindings>
<netTcpBinding>
<binding name="MyService.Binding" closeTimeout="00:10:00" openTimeout="00:10:00" receiveTimeout="00:10:00" sendTimeout="00:10:00" transactionFlow="false" transferMode="Buffered" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="524288" maxReceivedMessageSize="65536" listenBacklog="10" maxConnections="10">
<readerQuotas maxDepth="65536" maxStringContentLength="65536" maxArrayLength="65536" maxBytesPerRead="65536" maxNameTableCharCount="65536" />
<security mode ="None" />
</binding>
</netTcpBinding>
</bindings>
Follow me on Twitter
0 comments:
Post a Comment