![](/img/trans.png)
[英]The provided URI scheme 'http' is invalid; expected 'https'. Parameter name: via
[英]The provided URI scheme 'http' is invalid; expected 'https'
我有一個win服務配置文件如下
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="BasicHttpBinding_webservice" closeTimeout="00:01:00"
openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
maxBufferSize="102400000" maxBufferPoolSize="102400000" maxReceivedMessageSize="102400000"
messageEncoding="Mtom" textEncoding="utf-8" transferMode="Buffered"
useDefaultWebProxy="true">
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="102400000"
maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<security mode="TransportCredentialOnly">
<transport clientCredentialType="Basic" proxyCredentialType="None"
realm="" />
<message clientCredentialType="UserName" algorithmSuite="Default" />
</security>
</binding>
</basicHttpBinding>
</bindings>
<client>
<endpoint address="http://systemname/ProxyService/Service.svc"
binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_webservice"
contract="ABC.webservice" name="BasicHttpBinding_webservice" />
</client>
我收到以下錯誤。 提供的URI方案“http”無效; 預計'https'。 參數名稱:via
我應該更改綁定或安全設置嗎? 順便禁用SSL證書。
看起來您已在安全設置中配置UserNameOverTransport - >在WCF中,僅允許使用HTTPS綁定,因為密碼使用此設置以明文形式傳輸。
安全明智的一個很好的功能,在開發時可能有點討厭。
同意喬治。 如果您有正當理由發送不安全的用戶/通行證,您可以通過ClearUsernameBinding在消息級別執行此操作: http ://webservices20.blogspot.com/2008/11/introducing-wcf-clearusernamebinding.html
我得到了同樣的錯誤並使用set as start project
.web
項目的set as start project
項目,現在它工作正常。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.