I created a web application (ASP.NET Core MVC) which retrieves large amounts of data from the SQL server. The application is installed in a server (A) with IIS 6.2 and Windows Server 2012R2, while the SQL server is installed in another server (B) with MS SQL Server 2014 and also Windows Server 2012R2.
When this application is installed in the server A, the retrieval of large amounts of data returns the error:
502 - Web server received an invalid response while acting as a gateway or proxy server.
There is a problem with the page you are looking for, and it cannot be displayed. When the Web server (while acting as a gateway or proxy) contacted the upstream content server, it received an invalid response from the content server.
When the application is running in my own computer with connection to the SQL of server B, no error is returned and the task completes successfully.
Is it a timeout or priority error? No error is returned in the Event Viewer of both server A and server B. Is it a configuration of server A (IIS or other)?
Note: the other applications in the server function normally.
Note: the log of the application has the following kind of messages:
warn: Microsoft.EntityFrameworkCore.Query[20500]
The LINQ expression 'where {from String q in __8__locals1_Geobricks_2 where [l].Geobrick.StartsWith([q]) select [q] => Any()}' could not be translated and will be evaluated locally.