Hi,
I'm jsut changing the App.Config with notepad (not in the application but
manually.
These are the steps:
- I install the application
- I go the the folder (C:\Program Files\MyApplica tion\"
- I open the file MyApplication.e xe.config with Notepad, and I change the
connectionstrin g
- I close the Myapplication.e xe.config, and start Myapplication.e xe
-> it still takes the old value (which isn't anymorei n the App.config...)
I didn't create the App.config or didn't change anything in it. when I
delete it the Settings.settin gs re-create it automaticly..
This is my application.con fig:
<?xml version="1.0" encoding="utf-8" ?>
<configuratio n>
<configSections >
<sectionGroup name="userSetti ngs"
type="System.Co nfiguration.Use rSettingsGroup, System, Version=2.0.0.0 ,
Culture=neutral , PublicKeyToken= b77a5c561934e08 9" >
<section name="MyApplica tion.Settings"
type="System.Co nfiguration.Cli entSettingsSect ion, System, Version=2.0.0.0 ,
Culture=neutral , PublicKeyToken= b77a5c561934e08 9"
allowExeDefinit ion="MachineToL ocalUser" requirePermissi on="false" />
</sectionGroup>
</configSections>
<connectionStri ngs>
<add name="MyApplica tion.Settings.M ainConnectionSt ring"
connectionStrin g="Data Source=MyServer ;Initial Catalog=MyDataB ase;Integrated
Security=True" />
</connectionStrin gs>
<system.diagnos tics>
<sources>
<!-- This section defines the logging configuration for
My.Application. Log -->
<source name="DefaultSo urce" switchName="Def aultSwitch">
<listeners>
<add name="FileLog"/>
<!-- Uncomment the below section to write to the
Application Event Log -->
<!--<add name="EventLog"/>-->
</listeners>
</source>
</sources>
<switches>
<add name="DefaultSw itch" value="Informat ion" />
</switches>
<sharedListener s>
<add name="FileLog"
type="Microsoft .VisualBasic.Lo gging.FileLogTr aceListener,
Microsoft.Visua lBasic, Version=8.0.0.0 , Culture=neutral ,
PublicKeyToken= b03f5f7f11d50a3 a, processorArchit ecture=MSIL"
initializeData= "FileLogWri ter"/>
<!-- Uncomment the below section and replace APPLICATION_NAM E
with the name of your application to write to the Application Event Log -->
<!--<add name="EventLog"
type="System.Di agnostics.Event LogTraceListene r"
initializeData= "APPLICATION_NA ME"/> -->
</sharedListeners >
</system.diagnost ics>
<userSettings >
<MyApplication. Settings>
<setting name="LastClien tID" serializeAs="St ring">
<value>0</value>
</setting>
</MyApplication.S ettings>
</userSettings>
</configuration>
"Bajoo" <Na**********@g mail.com> wrote in message
news:11******** *************@g 43g2000cwa.goog legroups.com...
Dear Pieter,
Are you changing the Values after application starts?
cause this wont change until the app restarts. and can you please show
the code you are using to change the App.Config
Regards,
Naveed Ahmad Bajwa
http://bajoo.blogspot.com/