I\'ve found myself having a requirement to configure log4net based on a file relative to the physical location of the running ASP.NET web application. We like to start the l
Try HttpRuntime.AppDomainAppPath. For more info, read IIS7 Integrated mode: Request is not available in this context exception in Application_Start posted by Mike Volodarsky.
As an alternative answer to my own question, I'd like to add that Server.MapPath()
works during the Application_Start
event as well. The application domain path would then be equal to Server.MapPath("~")
, but it's handier for mapping relative paths, removing the burden of concatenation (what MapPath was meant for to begin with).