c# - Massively increased new TCP connections # in .NET 4.5 over 4.0? -


i testing wpf/wcf client application in .net 4.5 vs 4.0 view of getting 4.5 rolled out client machines. wcf portion uses basichttpbinding/soap.

when testing 2 client versions under same conditions (win7 etc), we're seeing 10x increase in "new tcp connections" soap server endpoint - 4.0 clients establish ~450 per hour whilst 4.5 clients establishing ~6,000. since we're connecting remote server, troublesome establishing new tcp connection adds large latency web service call.

when using 4.0, have tuned client servicepointmanager settings maximise our tcp connection reuse , expected these settings applicable 4.5.

my application performs 1 call @ time, perhaps every 10 seconds on average - bursts of 10 concurrent calls every few minutes.

i've had @ changelogs , cannot find reference fixes/changes have been made part of .net. can shed light on might going on here?

servicepointmanager.usenaglealgorithm = true; servicepointmanager.expect100continue = false; servicepointmanager.defaultconnectionlimit = 50; servicepointmanager.maxservicepointidletime = 10000;  binding binding = new basichttpbinding {     sendtimeout = timespan.fromseconds(_settings.sendtimeout),     receivetimeout = timespan.fromseconds(_settings.sendtimeout),     maxreceivedmessagesize = 1024 * 1024 * 10,     maxbuffersize = 1024 * 1024 * 10,     maxbufferpoolsize = 1024 * 1024 * 100,     security =         {             mode = basichttpsecuritymode.transportcredentialonly,             message = { clientcredentialtype = basichttpmessagecredentialtype.username },             transport = { clientcredentialtype = httpclientcredentialtype.basic },         }, }; 

this due regression introduced when fixing different problem. related chunked transfer-encoding responses server.

for using httpwebrequest directly, can workaround issue ensuring application reads entire response stream. means need call read or beginread method on stream until returns 0 number of bytes read.

for using wrapping technology wcf, there no known workaround on client side. if have access server, can change server send content-length based response instead of chunked response, should allow avoid problematic code paths on client.

a fix issue has been identified , released in upcoming update framework. if blocking you, please reach out microsoft customer support.


Comments

Popular posts from this blog

Change php variable from jquery value using ajax (same page) -

Pull out data related to my apps from Android Play Store and iOS App Store -

How can I fetch data from a web server in an android application? -