----------------------------------------------------------- New Message on BDOTNET
----------------------------------------------------------- From: SitaramanM Message 2 in Discussion Hi Guess this is related to ur post titled "Process Class" (http://groups.msn.com/BDotNet/general.msnw?action=get_message&mview=0&ID_Message=6396&LastModified=4675440249358621948), where i had suggested that u use the Assembly.Load. The problem u now have is that, the AppSettingsReader will always use the currently loaded application's AppBase. For example if AppA(CallingApp) uses Assembly.Load to load the AppB(CalledApp), then any code of AppB(CalledApp) which reads application settings will read the config file of AppA(CallingApp) only and will subsequently fail. The catch is that once the appdomain is leaded and initialized the configurationfile path CANNOT be changed. So what you need to do is 1) Create a AppDomainSetup object 2) Set the ApplicationBase, ConfigurationFile etc properties in this object, reflecting the AppB(CalledApp) directory path 3) Create a new AppDomain in the AppA(Calling App), passing this AppDomainSetup object 4) Assembly.Load AppB Assembly in this new domain Use this approach and code ur program. Probably a complex implementation, but IMO, the right and the clean way to do it. Am currently trying to write a sample code. Meanwhile u can try it urself hth regards, sr ----------------------------------------------------------- To stop getting this e-mail, or change how often it arrives, go to your E-mail Settings. http://groups.msn.com/BDotNet/_emailsettings.msnw Need help? If you've forgotten your password, please go to Passport Member Services. http://groups.msn.com/_passportredir.msnw?ppmprop=help For other questions or feedback, go to our Contact Us page. http://groups.msn.com/contact If you do not want to receive future e-mail from this MSN group, or if you received this message by mistake, please click the "Remove" link below. On the pre-addressed e-mail message that opens, simply click "Send". Your e-mail address will be deleted from this group's mailing list. mailto:[EMAIL PROTECTED]
