简体   繁体   English

提供的URI方案“http”无效; 预期'https'

[英]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.

相关问题 提供的URI方案“ http”无效; 预期为“ https”。 参数名称:通过 - The provided URI scheme 'http' is invalid; expected 'https'. Parameter name: via 提供的 URI 方案“https”无效; 预期的“http”,即使在指定之后<httpstransport /> - The provided URI scheme 'https' is invalid; expected 'http', Even after specifying <httpsTransport/> 通过HTTPS的NLog LogReceiverService抛出无效的URI方案异常 - NLog LogReceiverService over HTTPS throws invalid URI scheme exception 提供了无效的请求URI。 (堆栈跟踪中没有有用的信息) - An invalid request URI was provided. (No helpful info in the stack trace) WCF-找不到与https端点的方案http匹配的基地址 - WCF - Could not find a base address that matches scheme http for the https endpoint 提供了无效的请求 URI。 请求 URI 必须是绝对 URI 或必须设置 BaseAddress。 尝试使用网络服务 - An invalid request URI was provided. The request URI must either be an absolute URI or BaseAddress must be set. trying to consuming a webservice 从 http 到 https,得到“找不到与具有绑定 WebHttpBinding 的端点的方案 http 匹配的基地址” - Going from http to https, getting "Could not find a base address that matches scheme http for the endpoint with binding WebHttpBinding" Uri规范化压缩FTP方案 - Uri canonicalization compacting FTP scheme 更改 System.Uri 的方案 - Changing the scheme of System.Uri WCF:找不到与绑定WebHttpBinding的端点的方案http匹配的基地址。 注册的基址方案为[https] - WCF: Could not find a base address that matches scheme http for the endpoint with binding WebHttpBinding. Registered base address schemes are [https]
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM