我使用了下面没有“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/