Zero-Deployment issue: winform app cannot read the .config file

G

Guest

I have a trivial winform application that I try to launch from web browser.
It appears that it fails to execute the following code:

_currentConfig = (CityLightsConfigSettings)ConfigurationSettings.GetConfig(
CityLightsConfigSection );

This is a standard call that is used when one needs to acces config section
in the app.config file. The thing is that the call doesn't throw any
exceptions but _currentConfig is null after the call. I thought that this
would work just fine with zero-deployment but it doesn't work. I can run the
application locally without any problems and the code works just fine. I even
gave full trust to the assembly but it didn't make any difference.
I would appreciate any suggestions on this.

Thanks,
Norton.
 
G

Guest

Hi Neno,

Thanks for replying to my post. I tried what the article suggests but the
thing is that when I tried to acces the app.config file directly from the
browser, I don't get any access denied messages; The browser renders my
..config file just fine. But when I try to run my application, it fails to
read the config section in app.config.
Like I mentioned before, I don't get any exceptions or errors when it fails
to read, just that ConfigurationSettings.GetConfig() returns null.

Norton.

Neno Loje said:
Hi Norton,

Maybe this helps you:
http://www.dotnet-online.de/web/notouch/faq/howto_use_appconfig_and_ntd.html

If not, leave me a message.

Best,
--
Neno Loje [MVP C#]
http://www.dotnet-online.com

Norton said:
I have a trivial winform application that I try to launch from web browser.
It appears that it fails to execute the following code:

_currentConfig =
(CityLightsConfigSettings)ConfigurationSettings.GetConfig(
CityLightsConfigSection );

This is a standard call that is used when one needs to acces config
section
in the app.config file. The thing is that the call doesn't throw any
exceptions but _currentConfig is null after the call. I thought that this
would work just fine with zero-deployment but it doesn't work. I can run
the
application locally without any problems and the code works just fine. I
even
gave full trust to the assembly but it didn't make any difference.
I would appreciate any suggestions on this.

Thanks,
Norton.
 

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