I intend to return a static html page from my controller action. The html page is part of my project / bundle. I have the following code which works when run locally (localhost), but when on Azure, it fails. I don't have access to the Azure instance at the moment so I can not debug it or turn on Development mode for detailed errors etc. Please excuse the naiveness, what is the issue with the following code:
public IActionResult PrivacyPolicy()
{
//_hostingEnvironment is an instance of IHostEnvironment
var staticPage = PhysicalFile(System.IO.Path.Combine(_hostingEnvironment.ContentRootPath, "Views/Home/PrivacyPolicy.html"), "text/html");
return staticPage;
}
return File("Views/Home/PrivacyPolicy.html", "text/html");FileNotFoundExceptionFile("~/Views/Home/PrivacyPolicy.html", "text/html")file not found exception when running locally, I'm now seeking access to Azure to see where that file is going, it might not be getting published, wouldn't know until then