Saturday, July 24, 2010

SOLVED: The provided URI scheme 'http' is invalid; expected 'https'. Parameter name: via

HTTPS worked, but now it complains if I change to HTTP...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>

16 comments:

Anonymous said...

Thank you so much !
What a pain in the a** this conf file :p

Anonymous said...

2 years later, Thanks a lot!!!

Anonymous said...

Another 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.

My endpoint was being set up in code rather than a config, but the same problem/solution holds.


Thanks!

Joel said...

Despues de 4 años, Gracias, tu comentario me sirvio para complementar una conexion a java desde c sharp :D

Anonymous said...

4 years later, Thanks men! :)

Anonymous said...

finally a useful answer ! yay

Anonymous said...

Thanks a lot !!!!!!

Unknown said...

thankssss bro!!

Lucian said...

Lucian Mic - thank you, it helped a lot.

Anonymous said...

Thanks. You saved my time :)

Unknown said...

really really thank you !!

Unknown said...

really thank you!

Franz said...

You are a life saver! Awesome. Many thanks

Anonymous said...

Almost 9 years later and still saving lives :)

Houlie said...

Almost 9 years later, still saving lives

Anonymous said...

GOD, YES!! Thank you, dude!
9 years of excellent advise ))