net core 3.1 deploy iis https HTTP Error 502.3 - Bad Gateway A connection with the server could not be established

Fredy Hernandez Orozco 1 Reputation point


I am deploying an api in .net core 3.1 in a vpn in windows server 2019 with iis.

When making the http request, only the api works correctly.

when I add the https address it fails for both http or https


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.

Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
705 questions
Internet Information Services
Azure VPN Gateway
Azure VPN Gateway
An Azure service that enables the connection of on-premises networks to Azure through site-to-site virtual private networks.
1,411 questions
A set of technologies in the .NET Framework for building web applications and XML web services.
4,249 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Fredy Hernandez Orozco 1 Reputation point

    yes firewall is off

    This is the error log

    Fields: date time s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs(User-Agent) cs(Referer) sc-status sc-substatus sc-win32-status time-taken

    2022-03-21 04:06:41 POST /api/login X-ARR-CACHE-HIT=0&X-ARR-LOG-ID=03ef1bb2-5635-40ed-a7bb-21e57411eb87 40443 - PostmanRuntime/7.29.0 - 502 3 12029 1023