473,883 Members | 2,797 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

AppSettings problem

i have an app.config file in my vb vs2k5 win form project. when i try to set
a different value for "DbConnectionSt ring" and run the application i get the
following error. any help is appreciated.
the code i use to pull the value for "DbConnectionSt ring" is:
DbConnectionStr ing = ConfigurationMa nager.AppSettin gs("DbConnectio nString")

<?xml version="1.0" encoding="utf-8" ?>
<configuratio n>
<appSettings>
<add key="DbConnecti onString"
value="Data Source=DEVELOPM ENT;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\Deve lopment\dpolley \VBA1351_00\VBA 1351_00.applica tion
resulted in exception. Following failure messages were detected:
+ File, VBA1351_00.exe. config, has a different computed hash than
specified in manifest.
Mar 28 '06 #1
3 12165
stockbuildingsu pply wrote:
i have an app.config file in my vb vs2k5 win form project. when i
try to set a different value for "DbConnectionSt ring" 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.
Mar 28 '06 #2
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 =
ConfigurationMa nager.OpenExeCo nfiguratio(Conf igurationUserLe vel.None)DbConn ectionString = oConfig.AppSett ings.Settings(" DbConnectionStr ing").Value

"Leon Mayne" wrote:
stockbuildingsu pply wrote:
i have an app.config file in my vb vs2k5 win form project. when i
try to set a different value for "DbConnectionSt ring" 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.

Mar 29 '06 #3
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.

Mar 30 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
3034
by: Keith Chadwick | last post by:
I have 3 individual ASP.NET applications that make up the overall web application. Each of these websites share some common styles, scripts and xslt files. These are all placed in a single directory structure then in IIS each .NET application has the virtual directory called shared created. The problem is that and server side uri paths do not seem to recognize the virtual directory called 'shared'. For example when using an external...
2
15524
by: hazz | last post by:
I have spent more time than I care to admit trying to track down a very subtle error. Here is my app's xx.exe.config file. <?xml version="1.0" encoding="utf-8" ?> <configuration> <appsettings> <add key="PasswordProvider" value="fudge" /> </appsettings>
3
9084
by: jason | last post by:
i am coding a simple console application with Visual C# .NET in Visual Studio .NET my config file (myapp.exe.config) has the following appSettings section: <appSettings> <add key="myKey" value="myValue" /> </appSettings>
4
1701
by: Robert Pfeffer | last post by:
Hi, I have a rather unusual problem. I have a very simple ASP.NET application, basically hello world type. I created it with Visual Studio 2003 and am running it in debug mode. It runs fine until I put the <appSettings> section in its web.config file or machine.cfg. After that the application starts, the web browser opens, it connects and then shows waiting for page to open. At this point it just sits there forever. I cannot close...
2
5028
by: Jared Hagel | last post by:
I've searched the web for a solution to this problem. Surprisingly, no problem/solution has been posted yet. We can read application configuration information fine when our asp.net application runs on a Windows 2000 server. But when we run this same application from Windows 2003, we can't read any application configuration. The code in question is this (in default.aspx):
4
1476
by: Dr. Paul Caesar - CoullByte (UK) Limited | last post by:
We have a contact us page that is used throughout our sites. I have over the last few days modified all sites to obtain information from Application Settings. It is a simple form that when ran on the server sends an email using keys in application settings block of the web.config file. I have played about with the key and sometimes it works and sometimes does not. The key seems to be crashing IIS on Windows Server 2003 SP1.
5
12544
by: Simon Hart | last post by:
Hi, I want to use the ConfigurationSettings.AppSettings from within a .NET class library that gets called. If using the above class, what would the name of the config file be? would this be the name of the DLL that is calling it as per a Windows EXE ie : myexe.exe.config. I have named my Xml file mydll.dll.config where mydll is the name of my class library, but it doesn't seem to work. The config file is correct ie:
7
11117
by: moondaddy | last post by:
I'm running a wpf windows app and want to add the appSettings element to the config file. when I do, the app wont start up and I get the following error: {"The type initializer for 'System.Windows.Application' threw an exception."} {"The type initializer for 'System.Windows.Navigation.BaseUriHelper' threw an exception."} " at System.Windows.Application..ctor()\r\n at DiagramTool_v1.App..ctor()\r\n at DiagramTool_v1.App.Main() in
1
5827
by: Ken | last post by:
I'm currently using 1.1. Is there any way using the value of a ConfigurationSettings.AppSettings as a key of ConfigurationSettings.AppSettings.Tosting( )]? for example in web.config <add key="company" value="Hyundai" /> <add key="Hyundai" value="sonata" />
6
5399
by: Nick | last post by:
Hi there, I have a Windows Service application that has a load of settings defined, I can access these using My.Settings. I would like to pass the NameValueCollection of the settings to another class but unfortunately no matter what I try I get an empty colleciton back, i.e. System.Configuration.ConfigurationSettings.AppSettings
0
9944
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
11154
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10863
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10422
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7977
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5807
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
6005
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
4228
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3241
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.