title: Timeout while deploying Azure Web Application
body: <p>I’m writing a script to deploy my Azure Web Application. </p>
  
  <p>Msbuild works great for when I have the source code and want to compile and upload it to the WebApp. 
  On other occasions I want to upload a build drop that doesn’t contain the source code but only dlls and binaries. Then I zip the directory and upload the zip using the following command:</p>
  
  <pre><code>Invoke-RestMethod -Uri $apiUrl -Headers @{Authorization=("Basic {0}" -f $base64AuthInfo)} -Method PUT -InFile $zipFilePath -ContentType "multipart/form-data"
  </code></pre>
  
  <p>A lot of files are being uploaded and I therefore get a timeout:</p>
  
  <blockquote>
    <p>Invoke-RestMethod : 500 - The request timed out.           500 - The request timed out.  The web server failed to respond within the specified time.</p>
  </blockquote>
  
  <p>I found that there is a <a href="https://azure.microsoft.com/ru-ru/blog/new-configurable-idle-timeout-for-azure-load-balancer/" rel="nofollow noreferrer">Load Balancer limit</a> of 230 seconds but I’m not sure how to change it. I tried settings SCM_COMMAND_IDLE_TIMEOUT to 600 in my application settings but I still get the same timeout.</p>
  
  <p>My questions are:
  1.  How can I change the Load Balancer timeout in the Azure WebJob and avoid that exception?
  2.  Is there a better/easier way to upload the zip to the Azure WebJob? </p>