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.
- Common mistakes in WCF distributed development (15): Communication with the underlying transaction manager has failed.
- soap security negotiation failed
- SQL Server 2008 login 4064 error solution
- SQL Server 2008 18456 error and SA unable to login solution
- Command line access to passive mode FTP server failed, 425 failed to establish connection
- 【Linux】psql: FATAL: Ident authentication failed for user “username” Error and Solution
- Solve the problem that the interface between C # WinForm program and Oracle doesn’t respond for a long time
- Mongodb connection authentication auth failed solution
- Python module learning-Paramiko-Use python to throw an exception: Authentication failed.
- [Error resolution] paramiko.ssh_exception.SSHException: Error reading SSH protocol banner setting
- An authentication error occurred in the remote desktop connection
- Vs 2015 IIS express debug error: http error 401.2 – unauthorized
- gvim: GConf-WARNING **: Client failed to connect to the D-BUS daemon
- WebView loadrequest request request error “nsurlconnection finished with error – Code – 1022”
- SSIS package error report login failed for user’nt authority\anonymous logon’ solution
- Windows FTP Error 425: Unable to build data connection
- python：urllib2.URLError urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed
- Make sure the graphviz executables are on your systems’ path
- “Hive metadata problem” hive.metastore.HiveMetaException : Failed to get schema version.
- TLS error: error: RPC error: code = unavailable desc = transport is closing