I'm trying to get the absolute path of certain files in a C# class. Server.MapPath
works great of course for ASPX and their code-behind pages, but that doesn't exist in another class file. I tried HostingEnvironment.MapPath()
, but that complains that the relative virtual path isn't allowed. Any thoughts?
System.Web
is already imported.