Monday, 26 September 2011

The server has rejected the client credentials WCF Error NetTCpBinding

Hi,

When I created my WCF Service and Host it on server I found following Error.

“The server has rejected the client credentials”.

I resolved it with following changes.

1. At Server Side in Web.Config i added [<security mode="None"></security>] as example given below.

<netTcpBinding>
        <binding name="netTcpBinding"    maxReceivedMessageSize="2147483647">
          <readerQuotas maxStringContentLength="2147483647" maxArrayLength="22365478"/>
     <security mode="None"></security>
        </binding>
      </netTcpBinding>

2. On Client Side Also in my App.config [<security mode="None"></security>] as example given below.

 <netTcpBinding>
                <binding name="NetTcpBinding_IService1" closeTimeout="00:01:00"
                    openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
                    transactionFlow="false" transferMode="Buffered" transactionProtocol="OleTransactions"
                    hostNameComparisonMode="StrongWildcard" listenBacklog="10"
                    maxBufferPoolSize="524288" maxBufferSize="65536" maxConnections="10"
                    maxReceivedMessageSize="65536">
                    <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
                        maxBytesPerRead="4096" maxNameTableCharCount="16384" />
                    <reliableSession ordered="true" inactivityTimeout="00:10:00"
                        enabled="false" />
                  <security mode="None"></security>
                </binding>
            </netTcpBinding>

Good Luck.

Happy Coding.

No comments: