相关疑难解决方法(0)

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

我使用下面的配置没有"https".现在网址已更改为"https".但我得到"提供的URI方案'https'无效;预期'http'.Parameter名称:通过" 调用它时出错.

<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>
Run Code Online (Sandbox Code Playgroud)

如何修复错误?

asp.net wcf web-services

13
推荐指数
1
解决办法
3万
查看次数

WCF在http和https上都有自定义绑定

我有一个带有自定义绑定的WCF服务,它在http或https上工作正常.但我完全不知道如何在http和https上提供它?

也可以这样做吗?

这是我在web.config中的配置.

<system.serviceModel>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true"/>
<behaviors>
    <serviceBehaviors>
        <behavior name="">
            <serviceMetadata httpsGetEnabled="true" />                    
            <serviceDebug includeExceptionDetailInFaults="false" />
        </behavior>         
    </serviceBehaviors>
</behaviors>
<bindings>
    <customBinding>                     
        <binding name="customBinding0">
          <binaryMessageEncoding />
          <httpsTransport />
        </binding>
    </customBinding>
</bindings>
<services>
    <service name="MyWCFService">                           
        <endpoint address="" binding="customBinding" bindingConfiguration="customBinding0"
            contract="MyWCFService" />
        <endpoint address="mex" binding="mexHttpsBinding" contract="IMetadataExchange" />
    </service>      
</services>
Run Code Online (Sandbox Code Playgroud)

谢谢

https wcf http custom-binding

10
推荐指数
1
解决办法
1万
查看次数

标签 统计

wcf ×2

asp.net ×1

custom-binding ×1

http ×1

https ×1

web-services ×1