WebRoot Directory is pointed at explicit path to Development Machine even on Server

2023-02-01T17:06:01.12+00:00

I build my Dotnet 6 MVC application on my computer and copy it onto the server. Attempting to load the site results in a startup error.

"DirectoryNotFoundException: C:\Users*username*\source\repos\projectname\projectname\wwwroot"

It is somehow looking for a file on the development machine. How do I get it to find the wwwroot on the server machine?

Developer technologies | ASP.NET | ASP.NET Core
{count} votes

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.