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
2022-03-19T00:55:24.237+00:00

184707-screenshot-1.png184630-screenshot-2.png184717-screenshot-3.png184771-screenshot-4.png

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

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.

Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
760 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,574 questions
ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,663 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Fredy Hernandez Orozco 1 Reputation point
    2022-03-21T04:20:36.603+00:00

    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 85.215.208.137 POST /api/login X-ARR-CACHE-HIT=0&X-ARR-LOG-ID=03ef1bb2-5635-40ed-a7bb-21e57411eb87 40443 - 85.215.208.137 PostmanRuntime/7.29.0 - 502 3 12029 1023


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.