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.AspNetCore.Server.IISIntegrationand Microsoft.AspNetCore.Server.Kestrel. I have startup.cs app.UseStaticFiles, app.UseSessionand app.UseMVC.

I did

  • View my IIS installation
  • Install .NET Core Windows Server Hosting Bundle and reset IIS
  • Copy all files to server
  • Create a website and set the application pool No Managed Codeto the .NET CLR version
  • Add default web.config for .NET Core website
  • Grant application pool identity access to files
  • Try setting root to project root and wwwroot

I get the following error

502 - The 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 cannot be displayed. When the web server (acting as a gateway or proxy) contacts the upstream content server, it receives an invalid response from the content server.

What did i do wrong?

Jean-Pierre Fortin

After the cearbs prompt, I did one dotnet publish, copied the resulting folder to the website root, and recycled the app pool. It works beautifully.

Related


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

Error targeting .net core RC2 and .net4.6.1

Jimmy Shal I have the following project.json: { "version": "1.0.0-*", "dependencies": { "NETStandard.Library": "1.5.0-rc2-24027", "Dapper": "1.50.0-rc2b", "Microsoft.Extensions.DependencyInjection": "1.0.0-rc2-final", "System.Dynamic.Runtime

Error targeting .net core RC2 and .net4.6.1

Jimmy Shal I have the following project.json: { "version": "1.0.0-*", "dependencies": { "NETStandard.Library": "1.5.0-rc2-24027", "Dapper": "1.50.0-rc2b", "Microsoft.Extensions.DependencyInjection": "1.0.0-rc2-final", "System.Dynamic.Runtime

Error targeting .net core RC2 and .net4.6.1

Jimmy Shal I have the following project.json: { "version": "1.0.0-*", "dependencies": { "NETStandard.Library": "1.5.0-rc2-24027", "Dapper": "1.50.0-rc2b", "Microsoft.Extensions.DependencyInjection": "1.0.0-rc2-final", "System.Dynamic.Runtime

Error targeting .net core RC2 and .net4.6.1

Jimmy Shal I have the following project.json: { "version": "1.0.0-*", "dependencies": { "NETStandard.Library": "1.5.0-rc2-24027", "Dapper": "1.50.0-rc2b", "Microsoft.Extensions.DependencyInjection": "1.0.0-rc2-final", "System.Dynamic.Runtime

Error targeting .net core RC2 and .net4.6.1

Jimmy Shal I have the following project.json: { "version": "1.0.0-*", "dependencies": { "NETStandard.Library": "1.5.0-rc2-24027", "Dapper": "1.50.0-rc2b", "Microsoft.Extensions.DependencyInjection": "1.0.0-rc2-final", "System.Dynamic.Runtime

Build a .NET Core 1.0 RC2 app on the build server

Bruno Garcia I have updated my application from DNX, ASP.NET 5 RC1 to ASP.NET Core 1.0 RC2. It builds locally and runs fine. On the build server, I don't have Visual Studio installed, and the build fails with: error MSB4019: The imported project "C:\Program Fi

502.5 error when deploying asp.net core website using IIS

Tori E I have an ASP.NET Core 1.0 application that has been successfully deployed and running on a pre-production server for several months. Today I tried to deploy the website to our production server using this article as a guide : https://docs.asp.net/en/la

502.5 error when deploying asp.net core website using IIS

Tori E I have an ASP.NET Core 1.0 application that has been successfully deployed and running on a pre-production server for several months. Today I tried to deploy the website to our production server using this article as a guide : https://docs.asp.net/en/la

502.5 error when deploying asp.net core website using IIS

Tori E I have an ASP.NET Core 1.0 application that has been successfully deployed and running on a pre-production server for several months. Today I tried to deploy the website to our production server using this article as a guide : https://docs.asp.net/en/la

502.5 error when deploying asp.net core website using IIS

Tori E I have an ASP.NET Core 1.0 application that has been successfully deployed and running on a pre-production server for several months. Today I tried to deploy the website to our production server using this article as a guide : https://docs.asp.net/en/la

502.5 error when deploying asp.net core website using IIS

Tori E I have an ASP.NET Core 1.0 application that has been successfully deployed and running on a pre-production server for several months. Today I tried to deploy the website to our production server using this article as a guide : https://docs.asp.net/en/la

502.5 error when deploying asp.net core website using IIS

Tori E I have an ASP.NET Core 1.0 application that has been successfully deployed and running on a pre-production server for several months. Today I tried to deploy the website to our production server using this article as a guide : https://docs.asp.net/en/la

500 error when deploying asp.net core web api to IIS 7.5

username I have an asp.net core web API project that I am trying to host in IIS 7.5. As suggested in the following article, Could not find configuration file 'appsettings.json', it is not optional Below is my "appsettings.json" file, { "ConnectionStrings": {

Deploying ASP.NET Core API to local IIS error 500

Michael Reno Platama Setavan I have a problem with my application after deploying to local IIS. I've made an API using ASP.NET Core and have run it on Visual Studio and it works. It can perform GET, POST, PUT and DELETE requests. Then I want to deploy it to lo

Deploying ASP.NET Core API to local IIS error 500

Michael Reno Platama Setavan I have a problem with my application after deploying to local IIS. I've made an API using ASP.NET Core and have run it on Visual Studio and it works. It can perform GET, POST, PUT and DELETE requests. Then I want to deploy it to lo

Deploying ASP.NET Core API to local IIS error 500

Michael Reno Platama Setavan I have a problem with my application after deploying to local IIS. I've made an API using ASP.NET Core and have run it on Visual Studio and it works. It can perform GET, POST, PUT and DELETE requests. Then I want to deploy it to lo

Deploying ASP.NET Core API to local IIS error 500

Michael Reno Platama Setavan I have a problem with my application after deploying to local IIS. I've made an API using ASP.NET Core and have run it on Visual Studio and it works. It can perform GET, POST, PUT and DELETE requests. Then I want to deploy it to lo

Deploying ASP.NET Core API to local IIS error 500

Michael Reno Platama Setavan I have a problem with my application after deploying to local IIS. I've made an API using ASP.NET Core and have run it on Visual Studio and it works. It can perform GET, POST, PUT and DELETE requests. Then I want to deploy it to lo

Access local directory from Asp Net Core RC2 website using IIS

MapLion I have an Asp Net Core RC2 website that reads some files (we'll say C:\temp) from a server local directory. While it works fine from Visual Studio, it won't work when deployed to C:\inetpub\myWebSiteIIS (running in IIS 10.0) . I've tried researching pe