SmartClient - app.config


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
 
Ad

Advertisements

G

Guest

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.
 
Ad

Advertisements

M

Marc Scheuner

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top