Error "The username is not provided. Specify username in ClientCredentials." while calling secured web service "HTTPS".
Cause:
Actually there're three causes with my application:
- Security mode was not appropriae.
- Client credential type was not appropriate.
- The call missed passing the required Username and Passwoed.
Solution:
The solution was in setting the apporpiate security mode, client credentials type and passing the required username and password.
- Set the appropriate Security mode in the configuration file (app.config OR web.config),it's should be "Transport":
- Set the appropriate client credential type in the configuration file (app.config OR web.config),it's should be "Basic":
transport clientcredentialtype="Basic"
- Pass the required username and password:
proxy.ClientCredentials.UserName.UserName = "xyz";
proxy.ClientCredentials.UserName.Password = "123";
Ahmed A.Moneim