Azure timeout + wcf / WCF-Azure-NetTCP-Keep-Alive-09f50fd9

llarsson 41 Reputation points
2020-08-18T14:55:30.473+00:00

A lot of old posts about how to deal with azure timeout in old forums that are now somewhat broken / broken links.

Is there any change in recommendations & where can i download wcf modifications/suggestions, can someone reupload wcf changes i.e WCF-Azure-NetTCP-Keep-Alive-09f50fd9.zip?
Edit: It does work with ServicePointManager.SetTcpKeepAlive - had fiddler running & eating it. Can it be used to more fine-grained control / better than other solutions?

https://social.msdn.microsoft.com/Forums/azure/en-US/da6efdd1-6069-42c6-b178-91208e3f46fc/does-azure-have-something-sitting-in-front-of-vms-that-times-out-idle-connections?forum=WAVirtualMachinesforWindows

http://microsoftdevelopernetworksamples.blogspot.com/2017/07/wcf-azure-nettcp-keep-alive.html

https://social.msdn.microsoft.com/Forums/vstudio/en-US/237af07c-eb64-4211-861f-91ec14d1fd99/detecting-quotkeep-alivequot-failures?forum=wcf

Hi Alex,

Thanks for posting here.

The connection can be kept alive by either the application using techniques enlisted below or the PAAS and IAAS roles can be made part of a same virtual network, in which case the PAAS calls to the IAAS machine will not go via the load balancer and hence this will not apply.

[1] - Make sure the TCP connection is not idle. To keep your TCP connection active keeping sending some data before 240 seconds is passed. This could be done via chunked transfer encoding;send something or you can just send blank lines to keep the connection active.

[2] - If you are using WCF based application please have a look at below link:

         Reference: http://code.msdn.microsoft.com/WCF-Azure-NetTCP-Keep-Alive-09f50fd9  

[3] - If you are using TCP Sockets then you can also try ServicePointManager.SetTcpKeepAlive(true, 200000, 200000) might be used to do this. TCP Keep-Alive packets will keep the connection from your client to the load balancer open during a long-running HTTP request. For example if you’re using .NET WebRequest objects in your client you would set ServicePointManager.SetTcpKeepAlive(…) appropriately.

https://msdn.microsoft.com/en-us/library/system.net.servicepointmanager.settcpkeepalive(v=vs.110).aspx

Hope this helps.

Girish Prajwal

.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,370 questions
{count} votes