Setting ClientCredentials: getting "Username is not provided" error
Do you have security mode, clientCredentialtype configured appropriately in your configuration files? Here is a blog post that very closely matches your question. I hope this helps!
http://amadotech.blogspot.com/2009/11/error-username-is-not-provided-specify.html
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 password.
Related videos on Youtube
Chetan
Updated on June 04, 2022Comments
-
Chetan almost 2 years
I'm tasked with creating a WCF service from a local wsdl file. I have done some R&D on this task. I have added a web reference of that local wsdl file. Now I want to create a client for this service in order access the service.
How do I provide the username and password in the client?
Currently, when I am accessing the service methods in the client I get an error:
Username is not provided.
Here's the relevant code:
ServiceGetProductFeeds.ProductFeedServiceClient SerProdFeeds = new ServiceGetProductFeeds.ProductFeedServiceClient(); SerProdFeeds.ClientCredentials.UserName.UserName = "XXXXXX"; SerProdFeeds.ClientCredentials.UserName.Password = "*******"; SerProdFeeds.getProductFeed();
Any tips on what's not correct with the above code?
-
Chetan over 11 yearsHello, thanks for your reply, I have try the configuration that mention in given link in my app.config file, But now I am getting the following error "The provided URI scheme 'http' is invalid; expected 'https'. Parameter name: via", Any help on this