Equivalent of ClientCredentials in WCF connection from a C# WinForm?

296 Views Asked by At

What's the equivalent of ClientCredentials in WCF connection from a C# WinForm application to an HTTP request in Android Java or Swift?

ServicePointManager.ServerCertificateValidationCallback += delegate { return true; };

SvcClient objSvcClient = new SvcClient();
objSvcClient.ClientCredentials.UserName.UserName = txtUserName.Text;
objSvcClient.ClientCredentials.UserName.Password = txtPassword.Text;

int intout = objSvcClient.GetData(999);
objSvcClient.Close();

MessageBox.Show(intout.ToString());
1

There are 1 best solutions below

0
Ding Peng On

Just add the authorization header to the http request,for more information about it, you can refer to this link:

how to pass client credentials in postman?