c# - How do I disable keep-alive for a basicHttpRelayBinding to the Azure service bus? -
c# - How do I disable keep-alive for a basicHttpRelayBinding to the Azure service bus? -
i'm trying disable http keep-alive
, , can't seem find documentation on how accomplish that. ultimately, getting:
system.servicemodel.communicationexception: underlying connection closed: connection expected kept live closed server
i've heard best approach disable http keep-alive
.
ultimately solved own issue here little helper function takes basichttprelaybinding , modifies appropriately:
private static system.servicemodel.channels.binding getbinding(system.servicemodel.channels.binding bin) { var bout = new custombinding(bin); var transportelement = bout.elements .find<httpsrelaytransportbindingelement>(); transportelement.keepaliveenabled = false; homecoming bout; }
c# wcf servicebus azureservicebus
Comments
Post a Comment