title: Log4Net Relative Path To External Config
body: <p>I have a situation where I reference an external Log4Net Configuration File from my web root config. However, it's my individual applications that inherit the web root config and in turn reference the external Log4Net Config file.</p>
  
  <p>This all works fine and dandy if I have a hard coded path to the Log4Net Config. Ex: c:\inetpub\wwwroot\logging.config</p>
  
  <p>What I'd like to do is reference this logging.config without having to specify a drive letter or preferably via a relative path. This will make it easy to switch environments in the case where the websites now exist on the E:\ or D:\ or F:\ drives.</p>
  
  <p>I tried referencing the file in this form: \inetpub\wwwroot\logging.config - but Log4Net doesn't seem to pick it up.</p>
  
  <p>I've also considered grabbing the drive letter from HttpRuntime.AppDomainAppPath in code but it seems so hack'ish.</p>
  
  <p>Has anyone come up with a fancy method to reference an external Log4Net configuration file using reference paths instead of hard coded paths?</p>
  
  <p>Thank a bunch in advance for any help. :)</p>