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.HttpContext context =
System.Web.HttpContext.Current;
if (File.Exists(System.Web.HttpRuntime.AppDomainAppPa th + _VirtualPath))
{
_PhysicalPath =
System.Web.HttpRuntime.AppDomainAppPath + _VirtualPath;
}
else if (context != null)
{
_PhysicalPath = context.Server.MapPath(_VirtualPath);
}
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!