In this article, you will learn how to resolve the error that occurs while trying to run an ASP.NET Core project copied from one machine to another machine.
Problem I have created an ASP.NET Core project using the project template in Visual Studio 2015 on my laptop machine. It was working properly on my laptop. Then, I copied that same solution from my laptop to desktop machine and tried to run the project. When I tried to run the project, I got a 500 Internal Server Error as shown below (F: 1). But the same solution was working properly on my laptop. Analysis of Error Message When I copied the solution folder from my laptop to desktop machine, a hidden folder ".vs" also got copied. When I looked at the error message closely, I found that it was displaying the config file location as the location of that file on my laptop, as shown below (F: 2). So, to fix this issue, there are two solutions. Solution
The first solution is very easy. For the second solution, first we need to close Visual Studio 2015. To change the physical path for the solution in applicationhost.config file, open the applicationhost.config file located under .vs/config folder and search for term “sites”. It is an XML file. Under sites node, locate the site node where the physical path for the solution is specified and binding information contains the same port number as your application is trying to run on, as shown below.
Pro WPF: Windows Presentation Foundation in .NET 3.0