Is there way to set the App.Config file from the network share instead of providing it from the same directory where the .EXE is running. For example, Can I do something like this :
System.AppDomain.CurrentDomain.SetupInformation.ConfigurationFile = @"\\abc.com\root\myshare\it\development\T\_test2\App.Config";
and at runtime all my configuration parameters are set so that I can do something like this in my .cs file with no null exception.
string environment = System.ConfigurationManager["Environment"];
I really appreciate any ideas or suggestions on it.
Thanks
You can provide the CLR with configuration information for a new application domain using the AppDomainSetup class. When creating your own application domains, the most important property is ApplicationBase. The other AppDomainSetup properties are used mainly by runtime hosts to configure a particular application domain. Changing the properties of an AppDomainSetup instance does not affect any existing AppDomain. It can affect only the creation of a new AppDomain when the CreateDomain method is called with the AppDomainSetup instance as a parameter.
Microsoft reference