[英]The provided URI scheme 'http' is invalid; expected 'https'
I have a win service config file as follows 我有一个win服务配置文件如下
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="BasicHttpBinding_webservice" closeTimeout="00:01:00"
openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
maxBufferSize="102400000" maxBufferPoolSize="102400000" maxReceivedMessageSize="102400000"
messageEncoding="Mtom" textEncoding="utf-8" transferMode="Buffered"
useDefaultWebProxy="true">
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="102400000"
maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<security mode="TransportCredentialOnly">
<transport clientCredentialType="Basic" proxyCredentialType="None"
realm="" />
<message clientCredentialType="UserName" algorithmSuite="Default" />
</security>
</binding>
</basicHttpBinding>
</bindings>
<client>
<endpoint address="http://systemname/ProxyService/Service.svc"
binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_webservice"
contract="ABC.webservice" name="BasicHttpBinding_webservice" />
</client>
I am getting the following error. 我收到以下错误。 The provided URI scheme 'http' is invalid;
提供的URI方案“http”无效; expected 'https'.
预计'https'。 Parameter name: via
参数名称:via
Should I change the binding or security settings? 我应该更改绑定或安全设置吗? The SSL certificate is disabled by the way.
顺便禁用SSL证书。
It looks like you have configure UserNameOverTransport in the security settings --> In WCF this is only allowed using HTTPS binding, as Passwords are transmitted in cleartext using this setting. 看起来您已在安全设置中配置UserNameOverTransport - >在WCF中,仅允许使用HTTPS绑定,因为密码使用此设置以明文形式传输。
Security wise a good feature, can be a bit nasty while developing. 安全明智的一个很好的功能,在开发时可能有点讨厌。
Agree with Georg. 同意乔治。 If you have a valid reason to send unsecured user/pass you could do that at the message level via ClearUsernameBinding: http://webservices20.blogspot.com/2008/11/introducing-wcf-clearusernamebinding.html
如果您有正当理由发送不安全的用户/通行证,您可以通过ClearUsernameBinding在消息级别执行此操作: http ://webservices20.blogspot.com/2008/11/introducing-wcf-clearusernamebinding.html
我得到了同样的错误并使用set as start project
.web
项目的set as start project
项目,现在它工作正常。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.