asmgx
asmgx

Reputation: 7984

Consuming WSDL that requires authentication

I know how to consume ASMX file in C#.net

Simple

Right Click on References

Then Add Service Reference

Paste the ASMX service in the address bar

Click Go.

What the vendor sent us is a .wsdl link that needs userid and password.

how can I consume that in my application?

I tried to google that

most of the pages talk about asmx or wsdl without authentication.

will appreciate if someone helped me here

Upvotes: 0

Views: 596

Answers (1)

jazb
jazb

Reputation: 5791

assuming it's basic authentication:

client.ClientCredentials.UserName.UserName = "......";
client.ClientCredentials.UserName.Password = "......";

Upvotes: 1

Related Questions