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.
This all works fine and dandy if I have a hard coded path to the Log4Net Config. Ex: c:\inetpub\wwwroot\logging.config
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.
I tried referencing the file in this form: \inetpub\wwwroot\logging.config - but Log4Net doesn't seem to pick it up.
I've also considered grabbing the drive letter from HttpRuntime.AppDomainAppPath in code but it seems so hack'ish.
Has anyone come up with a fancy method to reference an external Log4Net configuration file using reference paths instead of hard coded paths?
Thank a bunch in advance for any help. :)