You receive the error message:
The provided URI scheme 'http' is invalid; expected 'https'.
Parameter name: via
… while using WCF to connect to an endpoint.
Probably you are trying to send a a username and password to authenticate although the connection is not secure (no HTTPS).
This modified binding should help:
<binding name="UserPasswordBinding">
security mode="TransportCredentialOnly">
transport clientCredentialType="Basic" />
/security>
/binding>
Thank you so much !
ReplyDeleteWhat a pain in the a** this conf file :p
2 years later, Thanks a lot!!!
ReplyDeleteAnother 2 years later comment. Was assigned an OOOOOOLD service which was using an HTTPS endpoint originally but I was rewriting it and needed to use HTTP to test locally. Got this issue and solved it in less than 2 minutes via google and this post.
ReplyDeleteMy endpoint was being set up in code rather than a config, but the same problem/solution holds.
Thanks!
Despues de 4 años, Gracias, tu comentario me sirvio para complementar una conexion a java desde c sharp :D
ReplyDelete4 years later, Thanks men! :)
ReplyDeletefinally a useful answer ! yay
ReplyDeleteThanks a lot !!!!!!
ReplyDeletethankssss bro!!
ReplyDeleteLucian Mic - thank you, it helped a lot.
ReplyDeleteThanks. You saved my time :)
ReplyDeletereally really thank you !!
ReplyDeletereally thank you!
ReplyDeleteYou are a life saver! Awesome. Many thanks
ReplyDeleteAlmost 9 years later and still saving lives :)
ReplyDeleteAlmost 9 years later, still saving lives
ReplyDeleteGOD, YES!! Thank you, dude!
ReplyDelete9 years of excellent advise ))