ASP.NET Core: Replacement for Server.MapPath

ASP.NET Core offers two different locations for files:

Content root – this is where application binaries and other private files are held.
Web root – this is where public files are held (wwwroot folder in web project).

By default, web root is located under content root. But there are also deployments where web root is located somewhere else. I have previously seen such deployments on Azure Web Apps. It’s possible that some ISPs also use different directories in trees for application files and web root.

Link: https://dzone.com/articles/aspnet-core-replacement-for-servermappath?utm_medium=feed&utm_source=feedpress.me&utm_campaign=Feed%3A+dzone%2Fwebdev