我在Windows託管服務的事件日誌中收到此錯誤。WCF安全和配置幫助 - 找不到https的基地址
服務無法啓動。
System.InvalidOperationException: 找不到與基本地址 匹配scheme https的端點 且綁定了BasicHttpBinding。 註冊的基地址方案是 [http]。
此服務一直運行到最近我們想要添加一些安全功能。這是我的basicHttpBinding
節點和我的服務節點。
<basicHttpBinding>
<binding name="BasicHttpBinding" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:10:00" transferMode="Buffered" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="52428800" maxBufferSize="65536000" maxReceivedMessageSize="65536000">
<readerQuotas maxDepth="32" maxStringContentLength="1819200" maxArrayLength="1638400" maxBytesPerRead="1409600" maxNameTableCharCount="1638400" />
<security mode="TransportWithMessageCredential" >
<message clientCredentialType="UserName"/>
</security>
</binding>
</basicHttpBinding>
<service behaviorConfiguration="CKISServiceBehavior" name="tcore.CKWcfService.CKISService">
<endpoint address="CKISService"
binding="basicHttpBinding"
bindingConfiguration="BasicHttpBinding"
bindingNamespace="http://ws.jcore.com"
contract="jcore.Common.ICKISService" />
<endpoint address="mex"
binding="mexHttpsBinding"
contract="IMetadataExchange" />
<host>
<baseAddresses>
<add baseAddress="https://localhost:9303" />
</baseAddresses>
</host>
</service>
<behavior name="CKISServiceBehavior">
<serviceThrottling maxConcurrentCalls="300" maxConcurrentSessions="300" maxConcurrentInstances="400" />
<serviceMetadata httpsGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="false" />
</behavior>
任何想法這裏發生了什麼?我的服務將不再啓動,它告訴我我的基地址設置不正確。我該如何補救?
我也做了搜索,發現也類似於一個我遇到了一個問題。您是否在負載均衡器後面運行此服務?如果是這樣,LB是否將請求作爲HTTPS或HTTP傳遞給服務?我把它作爲HTTP傳遞。這裏有一個類似的問答來自SO:http://stackoverflow.com/questions/363285/https-with-wcf-error-could-not-find-base-address-that-matches-scheme-https – 2010-07-15 02:42:58
你試過了嗎? – Kiquenet 2015-04-09 13:46:15