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

Popular posts from this blog

How do I check if an insert was successful with MySQLdb in Python? -

delphi - blogger via idHTTP : error 400 bad request -

postgresql - ERROR: operator is not unique: unknown + unknown -