Use (app.exe.config) and it needs to be in the same directory as app.exe. App.exe is the name of your exe. So if it is myWinForm.exe then your config file will be named myWinForm.exe.config.
-----Original Message----- From: Moderated discussion of advanced .NET topics. [mailto:[EMAIL PROTECTED]] On Behalf Of Jeff Hughes Sent: Monday, July 15, 2002 2:55 PM To: [EMAIL PROTECTED] Subject: [ADVANCED-DOTNET] app.exe.config I am trying to create a .config file for a windows test application. I am using System.Configuration namespace trying to access northwind and pubs I am trying to access them by this line of code strConnection = ConfigurationSettings.AppSettings["northwind"] how do I name the .config file so it will associate itself with my app assembly.exe.config app.config app.exe.config <app>.exe.config <app>.config here is the xml from my config file <?xml version="1.0" encoding="utf-8" ?> <configuration> <appsettings> <add key="northwind" value="server=(local);user id=test;password=test;database=northwind" /> <add key="pubs" value="server=(local);user id=test;password=test;database=pubs" /> </appsettings> </configuration> You can read messages from the Advanced DOTNET archive, unsubscribe from Advanced DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com. You can read messages from the Advanced DOTNET archive, unsubscribe from Advanced DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com.
