“The configuration file C:\mywebapp\mydoamin.dll.config could not be found.”
mywebapp domain is the originating code. mydomain is the executing code that references FileConfigurationSource and that is where the config file is located. I’m expecting it to look in mydomain… c:\mydomain\mydomain.dll.config instead. Am I missing something?
If you are using a relative path with
FileConfigurationSourceit is going to look for the file in theAppDomain.CurrentDomain.BaseDirectorydirectory. Actually, it will combine the BaseDirectory with the relative path given as the constructor argument to try to locate the file.You either need to deploy the configuration file into the web root directory (based on your current code) or use an absolute path.