Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net Building Controls (http://www.velocityreviews.com/forums/f59-asp-net-building-controls.html)
-   -   Configuration (http://www.velocityreviews.com/forums/t757200-configuration.html)

Paul Ledger 11-04-2004 09:52 AM

Configuration
 
I've written a control and I want to be able to pass certain information to
it via a configuration file. I've created the config using the namespace +
dll + config and I've placed it in the bin directory on the website. But when
it comes to reading the information from the file using...

string repositoryClass =
ConfigurationSettings.AppSettings.Get("ICacheRepos itoryClass");

I always get null as the value

Is there anyway of finding exactly where .NET looks for the file?

Hope someone can help


Josue Camargo Cruz 11-07-2004 07:53 PM

Re: Configuration
 
"Paul Ledger" <PaulLedger@discussions.microsoft.com> wrote in message news:<4D0B2558-553D-40D8-8019-FF8F11CD58D1@microsoft.com>...
> I've written a control and I want to be able to pass certain information to
> it via a configuration file. I've created the config using the namespace +
> dll + config and I've placed it in the bin directory on the website. But when
> it comes to reading the information from the file using...
>
> string repositoryClass =
> ConfigurationSettings.AppSettings.Get("ICacheRepos itoryClass");
>
> I always get null as the value
>
> Is there anyway of finding exactly where .NET looks for the file?
>
> Hope someone can help


Hi Paul, the problem is that the ConfigurationsSettings.AppSetings
reads from the file "AppName.exe.config" or "Web.config" (depending if
it's a winforms or web project). The configuration file you are
searching for is not on the bin directory, but outside, with the asmx
files.


All times are GMT. The time now is 04:19 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.