【发布时间】:2010-07-14 18:54:10
【问题描述】:
我在 Windows 托管服务的事件日志中收到此错误。
服务无法启动。
System.InvalidOperationException: 找不到一个基地址 匹配端点的方案 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 的类似问答:stackoverflow.com/questions/363285/…
标签: c# wcf configuration wcf-binding wcf-security