"提供的 URI 方案“https”;无效;预期是“http”。参数名称:via” - 帮助?

发布于 2024-12-06 03:10:07 字数 1452 浏览 1 评论 0 原文

我查遍了互联网和堆栈溢出来解决这个问题,但没有任何效果,我希望有人知道我错过了什么。

我正在尝试连接到 https: 服务,但收到此错误

“提供的 URI 方案 'https' 无效;预期为 'http'。参数名称:via”

这是我的配置:

<system.serviceModel>
<client>
  <endpoint address="https://authenicate.example.com/service/authenticate" behaviorConfiguration="Project" binding="basicHttpBinding" bindingConfiguration="SSLBinding" contract="Example.Test.Authentication" name="InternalAuthenticate" />
</client>
<bindings>
  <basicHttpBinding>
    <binding name="SSLBinding" maxBufferSize="2147483647" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647">
      <security mode="Transport" />
      <readerQuotas maxDepth="32" maxStringContentLength="2048000" maxArrayLength="2147483647" maxBytesPerRead="4096" maxNameTableCharCount="2147483647" />
    </binding>
  </basicHttpBinding>
</bindings>
<services />
<behaviors>
  <endpointBehaviors>
    <behavior name="Project">
      <dataContractSerializer maxItemsInObjectGraph="2147483647" />
    </behavior>
  </endpointBehaviors>
  <serviceBehaviors>
    <behavior name="DispatcherBehavior">
      <serviceMetadata httpsGetEnabled="true" />
      <serviceDebug includeExceptionDetailInFaults="true" />
    </behavior>
  </serviceBehaviors>
</behaviors>

有什么想法吗?

I am looked all over the internet and all over stack overflow to fix this problem and nothing has worked I hope someone has an idea what I am missing.

I am trying to connect to an https: service but I am getting this error

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

This is my config:

<system.serviceModel>
<client>
  <endpoint address="https://authenicate.example.com/service/authenticate" behaviorConfiguration="Project" binding="basicHttpBinding" bindingConfiguration="SSLBinding" contract="Example.Test.Authentication" name="InternalAuthenticate" />
</client>
<bindings>
  <basicHttpBinding>
    <binding name="SSLBinding" maxBufferSize="2147483647" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647">
      <security mode="Transport" />
      <readerQuotas maxDepth="32" maxStringContentLength="2048000" maxArrayLength="2147483647" maxBytesPerRead="4096" maxNameTableCharCount="2147483647" />
    </binding>
  </basicHttpBinding>
</bindings>
<services />
<behaviors>
  <endpointBehaviors>
    <behavior name="Project">
      <dataContractSerializer maxItemsInObjectGraph="2147483647" />
    </behavior>
  </endpointBehaviors>
  <serviceBehaviors>
    <behavior name="DispatcherBehavior">
      <serviceMetadata httpsGetEnabled="true" />
      <serviceDebug includeExceptionDetailInFaults="true" />
    </behavior>
  </serviceBehaviors>
</behaviors>

Any Ideas?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

跨年 2024-12-13 03:10:07

您可以使用 Mex 绑定代替 HTTPS。正如评论中提到的,有一些替代方案不需要使用 Mex 绑定。请查看此示例

You can use Mex binding instead for HTTPS. As mentioned in the comments there are alternatives that don't require the use of Mex binding. Take a look at this example.

极度宠爱 2024-12-13 03:10:07

或者使用自定义绑定。

  <customBinding>
    <binding name="CustomHttpBinding">
      <security allowInsecureTransport="True">
      </security>
      <httpTransport />
    </binding>
  </customBinding>

我必须这样做才能解决使用 WCF 和负载均衡器的一些问题

Or use a custom binding.

  <customBinding>
    <binding name="CustomHttpBinding">
      <security allowInsecureTransport="True">
      </security>
      <httpTransport />
    </binding>
  </customBinding>

I've had to do this to get arround some problems using WCF and a load balancer

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文