filePathmay be relative or absolute. If you specify a relative path, then the path is considered relative to the directory AppDomain.CurrentDomain.BaseDirectory. As you have discovered, you cannot use the root path (~ / enterpriseiselibrary.config).
I am not sure why your configuration file was not found; the root of your web application should be basic.
For debugging you can check that:
File.Exists(
Path.Combine(AppDomain.CurrentDomain.BaseDirectory,
"enterpriselibrary.config"))
true. , Enterprise Library .