Salve a tutti, ho fatto un programmino in asp con net 5.0 per caricare e scaricare dei file in un sito, quando lo testo in locale funziona perfettamente, invece se lo pubblico mi dà errore 
HTTP Error 502.3 - Bad Gateway
The connection with the server was terminated abnormally
leggendo in giro ho visto che potrebbe esser un errore di request timout che di default è 2 minuti, come il tempo che passa prima di andare in errore,
ho provato a forzare il web.config che si crea dopo la pubblicazione, aggiugendo il request timout
questo è il web.config che si crea dopo la pubblicazione
<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <location path="." inheritInChildApplications="false">
    <system.webServer>
      <handlers>
        <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
      </handlers>
      <aspNetCore processPath=".\Cedolini.exe" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" hostingModel="inprocess" />
    </system.webServer>
  </location>
</configuration>
<!--ProjectGuid: 0f7563e2-0f2e-45d2-841b-3b0fae0ac0a8-->
io l'ho modifcato così ed aggiornato tramite l ftp
<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <location path="." inheritInChildApplications="false">
    <system.webServer>
      <handlers>
        <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
      </handlers>
      <aspNetCore requestTimeout="01:00:00" processPath=".\Cedolini.exe" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" hostingModel="inprocess" />
    </system.webServer>
  </location>
</configuration>
<!--ProjectGuid: 0f7563e2-0f2e-45d2-841b-3b0fae0ac0a8-->
 
ma non ho sortito nessun effetto il codice del controller dove avviene l 'errore è
        //UPLOAD MULTIPLA
        [Authorize]
        [HttpPost]
        public async Task<IActionResult>Index(List<IFormFile> files, int CodCliente)
        {
            ModelState.AddModelError("Error", "Check ID");
            if (files == null || files.Count == 0)
                return Content("Cedolino NON Selezionato");
            long size = files.Sum(f => f.Length);
            var filePaths = new List<string>();
            
            foreach (var formFile in files)
            {
                if (formFile.Length > 0)
                {
                    // full path to file in temp location
                    var filePath = Path.Combine(WebHostEnvironment.WebRootPath, "ArchivioDocumenti");
                    filePaths.Add(filePath);
                    var fileNameWithPath = string.Concat(filePath, "\\", formFile.FileName);
                    string filename = formFile.FileName;
                    
                    if (System.IO.File.Exists(fileNameWithPath))
                    {
                        _context.Database.ExecuteSqlRaw("DELETE FROM ElencoCedolini WHERE(NomeDocumento = '" + filename + "')");
                        System.IO.File.Delete(fileNameWithPath);
                    }
                    using (var stream = new FileStream(fileNameWithPath, FileMode.Create))
                    {
                        await formFile.CopyToAsync(stream);
                    }
                    CodCliente = 0;
                    await _context.Database.ExecuteSqlRawAsync("INSERT INTO ElencoCedolini (NomeDocumento, TipoDocumento, Cliente, CodiceCliente, CodiceFiscale, Anno , Inquadramento, " +
                        "Mese,Sviluppo, Cantiere, Listino, ProgrListino, Def) " +
                        "SELECT N'" + filename +"', N'" +filename.Substring(0, 3) + "', N'" + filename.Substring(3, 3) + "'," + CodCliente + ", N'" + filename.Substring(6, 16) +"',"+ 
                        "" + Int32.Parse(filename.Substring(22, 4)) + ",N'" + filename.Substring(26, 3) + "'," + Int32.Parse(filename.Substring(29, 2)) + ","+
                        ""+ Int32.Parse(filename.Substring(31, 2)) + "," + Int32.Parse(filename.Substring(33, 4)) + "," + Int32.Parse(filename.Substring(37, 3)) + "," + 
                        "" +Int32.Parse(filename.Substring(41, 1)) + "," + Int32.Parse(filename.Substring(42, 3)) + ";");
                }
            }
            ViewBag.Message = string.Format("Cedolini Importati Correttamente!", DateTime.Now.ToString());
            
            return View("Index");
        }
vorrei capire come impostare il request time che di default è 2 minuti in circa 10 (se è questo l errore)
grazie