我有一個服務調用導致以下錯誤:「提供的URI方案'http'無效;預期'https'。」Web服務錯誤「提供的URI方案'http'無效;期望'https'。」
的app.config值:
<basicHttpBinding>
<binding name="xx_xxxxx_spcName" closeTimeout="00:01:00"
openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
maxBufferSize="655360" maxBufferPoolSize="524288" maxReceivedMessageSize="655360"
messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
useDefaultWebProxy="true">
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<security mode="Transport">
<transport clientCredentialType="None" />
</security>
</binding>
</basicHttpBinding>
<client>
<endpoint address="http://server/serviceaddress_removed"
binding="basicHttpBinding" bindingConfiguration="xx_xxxxx_spcName"
contract="xx.xx_xxxxx_spcName" name="xx_xxxxx_spcName" />
</client>
我用盡https://開頭,但逝去的內部所以不希望我需要這個,再說這也給一個客戶機/服務器錯誤。
我也試圖改變綁定類型
我也通過其他論壇的帖子看着這裏和asp.net和似乎都在用運輸和傳遞客戶端憑證點,我正在做在我的代碼如下:
client.ClientCredentials.UserName.UserName = "XXXXX";
client.ClientCredentials.UserName.Password = "XXXXX";
當IIS配置爲需要SSL時,我遇到了類似的問題。 – 2013-10-10 21:54:11