app.config and 64-bit machines
- by Dale Lutes
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.