在我的服务中,我需要设置keepAliveEnable = false才能使用我的负载均衡器。因此,我按照this文章中的说明进行操作。我做了文章中提到的同样的事情,但我收到了这个错误。
<customBinding>
<binding name="HttpBinding" keepAliveEnabled="False"/>
</customBinding>
The Scheme cannot be computed for this binding because this CustomBinding lacks a TransportBindingElement. Every binding must have at least one binding element that derives from TransportBindingElement.
然后我发现如下所示设置keepAliveFalse
<customBinding>
<binding name="HttpBinding" >
<textMessageEncoding />
<httpTransport allowCookies="false" keepAliveEnabled="false"/>
</binding>
</customBinding>
在此方法中,服务正常启动,我可以获得响应。但是在请求标头中仍然显示连接为keep alive。 (我用萤火虫检查了)