If I have an assembly library (dll) that is referenced from within an ASP.NET MVC app, is it possible for the assembly to get to the server path without having to pass it in from the MVC app, or have access to HttpContext?
If I use a relative path, it will return the processes path. In the case of running locally in debug, it is:
C:\Program Files\IIS Express
However, the file lives in the bin output, with this DLL, and the rest of the site's binaries.
Is my only choice to pass the path in from the web app?
UPDATE
For now, I'm just using HttpContext.Current.Server.MapPath(), but I don't like having to use HttpContext, in the event that we consume this API from something other than a web app.