asp.net - 提供的 URI 方案 'https' 无效;预期 'http' 。参数名称 : via

标签 asp.net wcf web-services

我使用了下面没有“https”的配置。现在网址更改为“https”。但我在调用时收到“提供的 URI 方案 'https' 无效;预期 'http'.参数名称:via” 错误。

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

如何修复错误?

最佳答案

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

<security mode="Transport">

我们使用 https 服务,这就是我们使用的模式 - 我们在开发环境中对 http 使用 None

关于asp.net - 提供的 URI 方案 'https' 无效;预期 'http' 。参数名称 : via,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9010637/

相关文章:

c# - 什么导致asp.net内存不足异常

asp.net - 在 IIS 上使用 .NET Core 运行 ASP.NET 5 (MVC 6)

xml - 如何防止 JSON Web 服务响应下载到文件?

java - Apache CXF 异常 : java. lang.RuntimeException:找不到地址的管道启动器

javascript - 从 javascript 按时间间隔调用 C# 方法

c# - 计划的 .NET WebJob V3 示例

c# - 将自定义 WSDL 绑定(bind)到现有 WCF 服务

sql-server - Service Broker 和 WCF 互操作性

macos - 如何让 AppleScript SOAP 与现有的 SOAP 网络服务一起工作(例如 W3Schools 的CelsiusToFarenheit 示例)?

c# - HTTP Get 请求中的 Unicode 字符