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
This theme is simply matchless :), it is very interesting to me)))
ReplyDeleteYour blog keeps getting better and better! Your older articles are not as good as newer ones you have a lot more creativity and originality now keep it up!
ReplyDeleteI wish not acquiesce in on it. I regard as precise post. Specially the title attracted me to be familiar with the unscathed story.
ReplyDeleteThere are various types of term life insurance rates, they all have some common attributes. You pay an insurance company what are called premiums. At your death, the life insurance company pays an amount to the people you named in your policy, called beneficiaries. Also it's interesting that if you named a beneficiary(ies) they'd receive the insurance amount free of income tax.
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteAm getting the error mentioned here and i was trying out this solution but i can't figure out where this 'proxy' comes from, am using vs2010, wcf please help
ReplyDeleteMy Client object generated by aading service reference doesn't have property to set ClientCredentials. then How can I set it?
ReplyDelete-patel
This comment has been removed by the author.
ReplyDelete