I have overridden HttpApplication in my class library.
When my application starts, There are configuration files that I need to
load in order for my application to work correctly. This works great,
however, I now have a config file that I need that is located on a
virtual mapped path within iis.
During my HtppApplication load, I have no HttpContext, hence my problem.
How do I map a path when I have no Current Context?
string _VirtualPath = "/settings.config ";
System.Web.Http Context context =
System.Web.Http Context.Current ;
if (File.Exists(Sy stem.Web.HttpRu ntime.AppDomain AppPath + _VirtualPath))
{
_PhysicalPath =
System.Web.Http Runtime.AppDoma inAppPath + _VirtualPath;
}
else if (context != null)
{
_PhysicalPath = context.Server. MapPath(_Virtua lPath);
}
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!