app.config and 64-bit machines
Posted
by Dale Lutes
on Stack Overflow
See other posts from Stack Overflow
or by Dale Lutes
Published on 2010-05-28T16:25:03Z
Indexed on
2010/05/28
16:31 UTC
Read the original article
Hit count: 205
I have an app that works fine on 32-bit systems, but fails on XP 64 bit systems. I've tracked it down to the connection string defined in my app.config thus:
<connectionStrings>
<clear/>
<add name="IFDSConnectionString"
connectionString="Data Source=fdsdata;Initial Catalog=IFDS;
Trusted_Connection=true;Connect Timeout=0"
providerName="System.Data.SqlClient" />
</connectionStrings>
When I try to reference it in code, I find that the ConfigurationManager.ConnectionStrings collection only contains the LocalSqlServer connection string from the machine.config file and not my custom string.
Another oddity is that it works fine when I run the app out of Visual Studio. It is only when I run out of the release folder that the connection string does not get defined. The application's .exe.config file is there in the release folder along with the .exe file and is up to date.
© Stack Overflow or respective owner