【问题标题】:The provided URI scheme 'https' is invalid; expected 'http'.Parameter name: via提供的 URI 方案“https”无效;预期的“http”。参数名称:通过
【发布时间】:2012-02-19 02:30:57
【问题描述】:

我在下面的配置中使用了没有“https”的配置。现在 url 更改为 "https"。但我收到 “提供的 URI 方案 'https' 无效;预期为 'http'。参数名称:通过” 调用时出错。

<system.serviceModel>
<bindings>
  <basicHttpBinding>
    <binding name="ERightsPortBinding" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536" messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered" useDefaultWebProxy="true">
      <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384" />
      <security mode="None">
        <transport clientCredentialType="None" proxyCredentialType="None" realm="" />
        <message clientCredentialType="UserName" algorithmSuite="Default" />
      </security>          
    </binding>
  </basicHttpBinding>
</bindings>
<client>
  <endpoint address="https://dev.company.com/jws/ws/EService?WSDL" binding="basicHttpBinding" bindingConfiguration="ERightsPortBinding" contract="ERights.ERights" name="ERightsPort" />
</client>

如何修复错误?

【问题讨论】:

标签: asp.net wcf web-services


【解决方案1】:

security 标签的模式更改为Transport 会得到什么?

<security mode="Transport">

我们使用 https 服务,这是我们使用的模式——我们在开发环境中使用None 表示 http。

【讨论】:

  • 这对我有用,但是当我打电话给 eRights.isMember(userName);它说...“找不到 {ws.security.company.com}isMember 的调度方法”
  • 听起来您可能遇到了另一个问题(这意味着另一个问题)。您可以发布您的合同和实施(缩写版本),以查看是否有人可以看到您的服务合同存在问题。但这似乎与您最初的问题无关。
  • 看来您已经问过另一个问题了。如果这回答了您的问题,则应将其标记为如此。 :)
  • 谢谢大卫,这行得通..你能解释一下为什么这会解决它吗?仍然对这条错误消息的最初含义感到困惑。
猜你喜欢
  • 2015-11-19
  • 1970-01-01
  • 2011-01-27
  • 1970-01-01
  • 2021-11-03
  • 2010-12-14
  • 1970-01-01
  • 1970-01-01
  • 2011-11-22
相关资源
最近更新 更多