Get the VirtualPath of the Current Web.config

  • Thread starter Thread starter ThazKool
  • Start date Start date
T

ThazKool

I tried to derive from HttpConfigurationContext, instantiate it, and
much more. I don't want a configuration setting section handler. I
just want to know what is the Virtual Path of the current Web.config in
the application's configuration hierarchy. Any insight into this would
be greatly appreciated.

P.S. Please don't reply and tell me to use the paths from the Request
object. I to anchor to the Web.config files.

Thanks & ThazKool!
 
I don't know what this might return in a website, but maybe you can use
something like AppDomain.CurrentDomain.SetupInformation.ConfigurationFile.
 
Thanks for the lead, but it didn't pan out. I tried it from a sub-web
and it gave me the same Web.config which is the one used for by the
Application. I wonder how the Configuration is changed by the
application. I would like to have my code anchor its virtual paths to
current Web.config in the hierarchy.

Thanks,
ThazKool
 
Back
Top