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>

13 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 !!!!!!

Muhammet İkbal YAŞAR said...

thankssss bro!!

Lucian said...

Lucian Mic - thank you, it helped a lot.

Anonymous said...

Thanks. You saved my time :)

eda lüleci said...

really really thank you !!

eda lüleci said...

really thank you!

Franz said...

You are a life saver! Awesome. Many thanks