SmartClient - app.config

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi!

I have developed a SmartClient application for winforms wherein, it
downloads the exe from the server to the client machine. While executing the
exe, its not able access the "appSettings" values from the app.config file.

Anyone has take on this?

Thanks in advance.

Regards,
Baren
 
Hello Baren,

To retrieve the values from the <appSettings> section you need to write the
following code in C# file.
System.Configuration.ConfigurationSettings.AppSettings["SectionName"].ToString();

It may be possible that you left some of the sections in web.config file
unhandled.
Check whether all sections in file have been configured or not. If some of
the sections are not configured well, remove those sections.
Hope it would work in your scenario.

Jay Kudecha.
 
I have developed a SmartClient application for winforms wherein, it
downloads the exe from the server to the client machine. While executing the
exe, its not able access the "appSettings" values from the app.config file.

Have you

* added an explicit reference to "System.Configuration" to your app?

* added a "using System.Configuration" clause to your code?

* checked to make sure the app does indeed contain a file called
"app.config" in your VS.NET project?

* checked to make sure the app contains a file <myapp>.exe.config in
the output directory of the project?

* checked to make sure that file gets transferred to the client when
downloading your app from the server?

Marc
 
Back
Top