I need to get the physical path of a file in a controller based on Web API.
I have seen that I can use
var context = Request.Properties["MS_HttpContext"] as HttpContext;
to get the context and then, by mean of the Server object, to use MapPath... however, MS_HttpContext is of type System.Web.HttpContextWrapper and when I cast to HttpContext, null is assigned to the variable.
Any hint about how to do this?
Regards Jaime