Click here to Skip to main content
15,891,864 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I'm using a wcf service in my web application which is secured and runs by using login credentials. I have added the service reference using the wsdl url available to me and trying to invoke it in my web application.
While invoking the service from my web page I'm getting below error:
401 unauthorized :
The HTTP request is unauthorized with client authentication scheme 'Anonymous'. The authentication header received from the server was 'Basic realm="Myservice".
How do I pass an authorized request to the service which is secured using credentials.
Appreciate the help at earliest.

Regards,
Shweta

What I have tried:

Tried passing base.ClientCredentials.UserName.UserName but it didn't help still the same error.
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900