Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Calling a https web service (C#)

I implemented a web service which is available under some https url. The client (a console app) calls it, but the following error is thrown:

The provided URI scheme 'https' is invalid; expected 'http'.

I searched that in the net, but I am not really sure how to solve it? Is this solved by adding some code to the web service?

Thanks :-)

like image 725
grady Avatar asked May 20 '26 12:05

grady


1 Answers

You have <security mode="Transport"> on the binding. This means it uses https. Change the <endpoint address=...> to agree, or change to a non-transport-security http binding.

Was this svcutil-generated (Add Web Referenc) config? What does the server config look like? It is surprising to generate 'inconsistent' config like this from the metadata.

Regards

Karan Shah

like image 140
Karan Shah Avatar answered May 22 '26 02:05

Karan Shah