Answers for "core 5 Server.MapPath"

C#
1

core 5 Server.MapPath

public class HomeController : Controller
    {
        private readonly IHostingEnvironment _hostingEnvironment;

        public HomeController(IHostingEnvironment hostingEnvironment)
        {
            _hostingEnvironment = hostingEnvironment;
        }

        public ActionResult Index()
        {
            return Content($"WebRootPath = {_hostingEnvironment.WebRootPath}\n" +
                           $"ContentRootPath = {_hostingEnvironment.ContentRootPath}");
        }
    }
Posted by: Guest on January-24-2021

Code answers related to "core 5 Server.MapPath"

C# Answers by Framework

Browse Popular Code Answers by Language