Created
August 16, 2011 14:45
-
-
Save chgeuer/1149246 to your computer and use it in GitHub Desktop.
Turn off HTTP KeepAlive
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// When testing in an NLB environment, it's helpful to test | |
// with a WCF client which doesn't reuse open TCP connections | |
// for HTTP... | |
var bindingElements = wcfBinding.CreateBindingElements(); | |
var httpBe = bindingElements.OfType<HttpTransportBindingElement>().FirstOrDefault(); | |
if (httpBe != null) | |
{ | |
httpBe.KeepAliveEnabled = false; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment