Our WinForm program is isomorphic to WCF and is connected to the server deployed on the server. Today, many WinForm users report that they have encountered problems when using WinForm and thrown an exception. The server has rejected the client credentials
Now let’s talk about the security authentication of WCF. Generally, our LAN applications do not have any security configuration, so what is the default security configuration of WCF?If no security configuration is made, WCF adopts windows security authentication. The default configuration is as follows:
<netTcpBinding>
<binding name="netTcp">
<security mode="Transport">
<transport clientCredentialType="Windows" />
</security>
</binding>
</netTcpBinding>
After checking, it is found that all computers that throw exceptions have been disabled in the ad domain. WCF in the server because it is windows authentication, so found that the user has a problem, it threw this exception. When the users in the ad domain are restored, WCF will be normal.
It should be pointed out that there are other possible reasons for this exception. For example, when the WCF server needs to impersonate the client identity, it needs the client to provide the user name and password. If it does not, it will throw this exception.
In addition, if the security requirements are not so high, we can disable all security related settings. The configuration is as follows:
<bindings>
<netTcpBinding>
<binding name="customTcpBinding" maxReceivedMessageSize="20480000" transferMode="Streamed" >
<security mode="None"></security>
</binding>
</netTcpBinding>
</bindings>
In this way, you will no longer carry out identity authentication, and you will never throw an exception similar to identity authentication. As long as the corresponding server IP and port can be accessed, you can call it normally.
https://stackoverflow.com/questions/53098405/wcf-throws-exception-that-the-server-has-rejected-the-client-credentials-what-i
https://stackoverflow.com/questions/8577612/the-server-has-rejected-the-client-credentials
Read More:
- Zookeeper starts the client and reports an error: java.net.connectexception: connection rejected
- TIDB-kafka server: Message was too large, server rejected it to avoid allocation error
- HTTP Error 401.1 – Unauthorized:Access is denied due to invalid credentials
- “503 Service Unavailable” error when connecting to vCenter Server using vSphere Web Client (2121043)
- Grpc client access server prompt: RPC error: code = unimplemented desc = unknown service possible reasons
- Solution to error reporting on the client caused by adding fields on the CXF server
- After win7 shared the printer, the client connection prompt: the printer has been deleted (0x00000709)
- Reasons for being rejected immediately after telnet
- Server (for example: HTTP) has a large number of time_ Solutions to wait
- Dell server reported CPU 1 has an internal error (ierr)
- Error Code: 2006 – MySQL server has gone away
- Solve the java.net.connectexception: connection rejected: connect error
- error C4996 ‘pugixml_ Documentload ‘is declared as a rejected solution
- Unable to install SQL Server (setup.exe), VS Shell installation has failed with exit code 1638.
- (error when importing database): MySQL 2006-mysql server has gone away
- Domain error in object XXX “other” domain “other” rejected values and atm913
- Local can link to the server database, upload jar package to the server will report an error
- Ionic1 compiling IOS encountered * * archive failed * * cordovaerror: promise rejected with non error: ‘error code 65 f
- Rsync client synchronization error
- JDBC connect to Sql Server to connect to the database–The TCP/IP connection to the host localhost, port 1433 has failed