2011-09-21 97 views
3

我看遍了所有的互聯網和遍佈堆棧溢出來解決這個問題,沒有任何工作,我希望有人有一個想法,我失蹤。「提供的URI方案'https'無效;期望'http'。參數名稱:通過」 - 幫助?

我試圖連接到HTTPS:服務,但我收到此錯誤

「提供的URI方案的‘https’無效;預計‘HTTP’參數名:通過」

這是我的配置:

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

什麼想法?

回答

2

您可以使用Mex綁定代替HTTPS。正如評論中提到的,有些替代品不需要使用Mex綁定。看看this example

+0

這是不正確得到角落找尋一些問題。我可以在BasicHttpBinding中使用HTTPS。我確實有一個問題,包括需要消除mex endpoing,但... [Stackoverflow救援](http://stackoverflow.com/questions/11512969/wcf-on-https-generates-the-provided -uri-scheme-https-is-invalid-expected-ht) – ALEXintlsos

+2

這確實是不正確的。按照預期將安全模式設置爲Transport將使用HTTPS。有關更多詳細信息,請參閱http://msdn.microsoft.com/zh-cn/library/system.servicemodel.basichttpsecuritymode.aspx上的MSDN文檔。 – allu

0

或者使用自定義綁定。

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

我已經做到這一點使用WCF和負載平衡器

相關問題