How to use server.mappath in ASP.NET Core?
Server. Asp.net core does not provide MapPath. Instead, you can access any actual data stored in the specified location using the IWebHostEnvironment interface.