I appreciate it. 

Stephen Russell
AutoZone Contractor
Desk 901.495-7916
Cell  901.246-0159

Memphis TN




Richard Blewett <[EMAIL PROTECTED]> 
Sent by: "Discussion of advanced .NET topics." 
<ADVANCED-DOTNET@DISCUSS.DEVELOP.COM>
08/06/2007 02:20 PM
Please respond to
"Discussion of advanced .NET topics." 
<ADVANCED-DOTNET@DISCUSS.DEVELOP.COM>


To
ADVANCED-DOTNET@DISCUSS.DEVELOP.COM
cc

Subject
Re: [ADVANCED-DOTNET] Switch the app.config file used by app.






Bill's right - by the time your code is running it's too late to change 
the
config file for the current app domain. There are setting like which 
flavour
of the GC should be used in the config file and once the default is up and
running you can;t change that. You'll need to load the components that 
need
the other config file into a separate appdomain, setting its config file
location before you do.

Regards

Richard Blewett - DevelopMentor

> -----Original Message-----
> From: Discussion of advanced .NET topics. [mailto:ADVANCED-
> [EMAIL PROTECTED] On Behalf Of Booth, Bill
> Sent: 03 August 2007 00:10
> To: ADVANCED-DOTNET@DISCUSS.DEVELOP.COM
> Subject: [ADVANCED-DOTNET] Switch the app.config file used by app.
>
> I think the only way is via another AppDomain.
> http://msdn2.microsoft.com/en-
> us/library/system.appdomain.setupinformati
> on.aspx
>
>
> -----Original Message-----
> From: Discussion of advanced .NET topics.
> [mailto:[EMAIL PROTECTED] On Behalf Of Stephen
> Russell
> Sent: Thursday, August 02, 2007 3:08 PM
> To: ADVANCED-DOTNET@DISCUSS.DEVELOP.COM
> Subject: [ADVANCED-DOTNET] Switch the app.config file used by app.
>
>
> I am lost in getting a use of a real config file while the user sees a
> local one.
>
> I tried this : AppDomain.CurrentDomain.SetData("APP_CONFIG_FILE",
> "\\server\path")
>
> unfortunately that will try to write data when in turn I'm trying to
> read the data: If AppName = "ChargeIt" Then
>             ConnString = ConfigurationManager.ConnectionStrings(
> "mycompany.mybrand.ChargeIt.My.MySettings.ConnectionString"
> ).ConnectionString
>
> This throws an error that I already have connection string entity.
>
> So how to I change the app.config to any file I want?
>
> TIA
>
>
> Stephen Russell
> AutoZone Contractor
> Desk 901.495-7916
> Cell  901.246-0159
>
> Memphis TN
>
> ===================================
> This list is hosted by DevelopMentor(r)  http://www.develop.com
>
> View archives and manage your subscription(s) at
> http://discuss.develop.com
>
> The information in this e-mail is confidential, may be legally
> privileged and is intended solely for the addressee. If you have
> received this e-mail in error, you are hereby notified that any use,
> distribution, or copying of this communication is strictly prohibited.
>
> ===================================
> This list is hosted by DevelopMentor.  http://www.develop.com
>
> View archives and manage your subscription(s) at
> http://discuss.develop.com

===================================
This list is hosted by DevelopMentorĀ®  http://www.develop.com

View archives and manage your subscription(s) at 
http://discuss.develop.com


===================================
This list is hosted by DevelopMentorĀ®  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com

Reply via email to