ASP.NET .Net Core IIS returns 502 when request from Extranet


Tao Zhu

I successfully published an asp.net core (full framework) site to a server running Windows 2008 R2 and IIS 7. When I try to access it from PC it always returns 502 Bad GateWay like this: Extranet visit but when I access it from server it works fine.

I noticed that, according to the picture, the remote address is incorrect, but I don't know how to fix it.

I would be grateful if you could help me.

frank

Try changing the address using the UseUrls()method WebHostBuilder.

I posted a related answer here .

Related


Error when asp.net core switches from IISExpress to IIS

Mischa Levine I'm trying to run my asp.net core application (1.0, 1.1 or 2.0) using IIS instead of IIS Express. However, when I try to do so, I get the following error message: Could not start process c:\Program files\dotnet\dotnet.exe. Web server failed with

Server Error 502 when deploying .NET Core RC2 in IIS

Jean-Pierre Fortin I developed an MVC website using .NET Core RC2 developed by VS Code on Mac and trying to deploy it in Windows Server 2012 R2 IIS. I use https://docs.asp.net/en/latest/publishing/iis.html for reference. My project.json has Microsoft.AspNetCor

Server Error 502 when deploying .NET Core RC2 in IIS

Jean-Pierre Fortin I developed an MVC website using .NET Core RC2 developed by VS Code on Mac and trying to deploy it in Windows Server 2012 R2 IIS. I use https://docs.asp.net/en/latest/publishing/iis.html for reference. My project.json has Microsoft.AspNetCor

ASP Net Core request service in configure method returns null

Antoine Thiry I'm trying to get some services in the configure method so I can more easily seed the database with them. So I injected IServiceProvider into my Configure method, but everytime I do: var service = serviceProvider.GetService<UserService>();it retu

ASP Net Core request service in configure method returns null

Antoine Thiry I'm trying to get some services in the configure method so I can more easily seed the database with them. So I injected IServiceProvider into my Configure method, but everytime I do: var service = serviceProvider.GetService<UserService>();it retu

ASP Net Core request service in configure method returns null

Antoine Thiry I'm trying to get some services in the configure method so I can more easily seed the database with them. So I injected IServiceProvider into my Configure method, but everytime I do: var service = serviceProvider.GetService<UserService>();it retu

ASP Net Core request service in configure method returns null

Antoine Thiry I'm trying to get some services in the configure method so I can more easily seed the database with them. So I injected IServiceProvider into my Configure method, but everytime I do: var service = serviceProvider.GetService<UserService>();it retu

ASP Net Core request service in configure method returns null

Antoine Thiry I'm trying to get some services in the configure method so I can more easily seed the database with them. So I injected IServiceProvider into my Configure method, but everytime I do: var service = serviceProvider.GetService<UserService>();it retu

ASP.NET Core 404 error when publishing to IIS 7.5

Brandon I am using Visual Studio 2015 to publish my ASP.NET Core app to IIS 7.5. All I have to do is view a regular default.htm page in wwwroot. When I use IIS Express for VS everything works fine, but when I publish IIS 7.5 and point the physical path to the

ASP.NET Core page not found when publishing to IIS

tungi52 I updated my ASP.NET Core project from RC1 to 1.0 RTM (using Preview2 tool) and everything worked fine. I can debug in Visual Studio without issue. Next, I want to upload the site on Windows Server 2008 R2 and IIS 7.5. I installed the necessary Windows

Connect to SQL Server from IIS (ASP.Net Core)

Oscar Mateu I've spent hours trying various combinations to connect an asp.net core site hosted on an IIS server to a remote SQL Server using only SQL username and password, without logging out. Here is my connection string in appsettings.json: "ConnectionStr

Connect to SQL Server from IIS (ASP.Net Core)

Oscar Mateu I've spent hours trying various combinations to connect an asp.net core site hosted on an IIS server to a remote SQL Server using only the SQL username and password, without logging out. Here is my connection string in appsettings.json: "Connectio

Connect to SQL Server from IIS (ASP.Net Core)

Oscar Mateu I've spent hours trying various combinations to connect an asp.net core site hosted on an IIS server to a remote SQL Server using only SQL username and password, without logging out. Here is my connection string in appsettings.json: "ConnectionStr

Connect to SQL Server from IIS (ASP.Net Core)

Oscar Mateu I've spent hours trying various combinations to connect an asp.net core site hosted on an IIS server to a remote SQL Server using only SQL username and password, without logging out. Here is my connection string in appsettings.json: "ConnectionStr