AppSettings problem

G

Guest

i have an app.config file in my vb vs2k5 win form project. when i try to set
a different value for "DbConnectionString" and run the application i get the
following error. any help is appreciated.
the code i use to pull the value for "DbConnectionString" is:
DbConnectionString = ConfigurationManager.AppSettings("DbConnectionString")

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>
<add key="DbConnectionString"
value="Data Source=DEVELOPMENT;Initial
Catalog=VBA1351_00;Integrated Security=SSPI"
/>
</appSettings>
</configuration>

ERROR SUMMARY
Below is a summary of the errors, details of these errors are listed later
in the log.
* Activation of
file://\\filehost\Development\dpolley\VBA1351_00\VBA1351_00.application
resulted in exception. Following failure messages were detected:
+ File, VBA1351_00.exe.config, has a different computed hash than
specified in manifest.
 
L

Leon Mayne

stockbuildingsupply said:
i have an app.config file in my vb vs2k5 win form project. when i
try to set a different value for "DbConnectionString" and run the
application i get the following error.

+ File, VBA1351_00.exe.config, has a different computed hash than
specified in manifest.

Are you using ClickOnce deployment? It looks like the application isn't
getting rebuilt properly and the hashes for the files in the manifest arn't
getting updated with the new config file's hash. Make sure you completely
rebuild the entire project before testing the installer.
 
G

Guest

yes i am using clickonce deployment. i did a rebuild all and that resolve
the hash problem. however, when i change the value in VBA1351_00.exe.config
i.e. the app.config file in my vs2k5 project it doesnt pull the changed
value. it keeps using the value that was set in the app.config file at
design time. here is the code i use to access the app.config file:

oConfig =
ConfigurationManager.OpenExeConfiguratio(ConfigurationUserLevel.None)DbConnectionString = oConfig.AppSettings.Settings("DbConnectionString").Value
 
G

Gary Chang[MSFT]

Hi,
however, when i change the value in VBA1351_00.exe.config
i.e. the app.config file in my vs2k5 project it doesnt pull the
changed value. it keeps using the value that was set in the
app.config file at design time. here is the code i use to
access the app.config file:
...

I am not very clear about the scenario. If you change that app.config file
in your vs2k5 project, it seems still in the design time. Would you please
provide some more detail steps you used in this case?


Thanks!

Best regards,

Gary Chang
Microsoft Community Support
======================================================
PLEASE NOTE the newsgroup SECURE CODE and PASSWORD will be updated at 9:00
AM PST, February 14, 2006. Please complete a re-registration process by
entering the secure code mmpng06 when prompted. Once you have entered the
secure code mmpng06, you will be able to update your profile and access the
partner newsgroups.
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top