我遍布整个互联网,遍布堆栈溢出来解决这个问题,没有任何效果我希望有人知道我错过了什么。
我正在尝试连接到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>
任何想法?
答案 0 :(得分:2)
您可以使用Mex绑定代替HTTPS。正如评论中所提到的,有些替代品不需要使用Mex绑定。看看this example。
答案 1 :(得分:0)
或使用自定义绑定。
<customBinding>
<binding name="CustomHttpBinding">
<security allowInsecureTransport="True">
</security>
<httpTransport />
</binding>
</customBinding>
我必须这样做以使用WCF和负载均衡器来解决一些问题