Azure Web Apps Timeout long process request
<p>So, I have a web app running on Azure and there is a API endpoint which will handle a long process (about hour I can said). It is fine when running local on visual studio, but when it go to azure, it fail after request start 55 seconds.</p>

<p>I have research arount this issues over every platform, I alter a chances to add on this line of code on the end point.</p>

<pre><code>System.Web.HttpContext.Current.Server.ScriptTimeout = 10000;
</code></pre>

<p>So now it able to extend to timeout, but still fail to process after 3 minute 50 second. Upon this point, I have find out there is other thing call <strong>Load Balancer</strong>. They all saying that the Azure Load Balancer will auto kill all request after 4 minutes. So I stuck on this place. </p>

<p>So I have try all these solution. </p>

<p>1.System.Web.HttpContext.Current.Server.ScriptTimeout = 10000;
2.System.Net.ServicePointManager.SetTcpKeepAlive(true, 30000, 30000);
3.Use Start New Thread to handle long process and return http status code to client initial that the process is started.
4.Make long process as another async function</p>

<p>What I trying to achieve is quite simple, a long process function that can be trigger by scheduler task or manually(AJAX call).</p>

<p>Any suggestion ?</p>