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

RE: SmartClient - app.config by JayKudecha

JayKudecha
Thu Aug 17 23:31:02 CDT 2006

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.

"Baren" wrote:

> 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

Re: SmartClient - app.config by Marc

Marc
Fri Aug 18 00:04:34 CDT 2006

>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