setup a new AppDomain

Sep 25, 2009 at 3:58 PM
Edited Sep 25, 2009 at 4:38 PM


which are the possible ways to change the appdomain of a programm. i tried it this way:


Console.WriteLine("Alte Appconfig: " + AppDomain.CurrentDomain.SetupInformation.ConfigurationFile.ToString)
AppDomain.CurrentDomain.SetData("APP_CONFIG_FILE", My.Computer.FileSystem.SpecialDirectories.CurrentUserApplicationData + "\app.config")  Console.WriteLine("Neue Appconfig: " + AppDomain.CurrentDomain.SetupInformation.ConfigurationFile.ToString + vbCrLf)

the last console.writeline shows the new domain string but if i read a key from the new appdomain
Dim lReader As New System.Configuration.AppSettingsReader
Dim lUseLocalSettings = lReader.GetValue("UseLocalSettings", System.Type.GetType("System.Boolean"))

i still get the old values!







Sep 28, 2009 at 6:37 AM
Edited Sep 28, 2009 at 6:39 AM


I'm not sure if this is a ent lib related question. You can post this to the .NET framework forum to get better answer.

You may also want to check this out :

Valiant Dudan
Global Technology and Solutions
Avanade, Inc.