Configuration

Discussion in 'ASP .Net Building Controls' started by Paul Ledger, Nov 4, 2004.

  1. Paul Ledger

    Paul Ledger Guest

    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("ICacheRepositoryClass");

    I always get null as the value

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

    Hope someone can help
     
    Paul Ledger, Nov 4, 2004
    #1
    1. Advertising

  2. "Paul Ledger" <> wrote in message news:<>...
    > 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("ICacheRepositoryClass");
    >
    > 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.
     
    Josue Camargo Cruz, Nov 7, 2004
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. S. Justin Gengo

    Re: Build configuration

    S. Justin Gengo, Aug 7, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    880
    S. Justin Gengo
    Aug 7, 2003
  2. Arsalan Ahmad

    Configuration Problem..Please Help

    Arsalan Ahmad, Jan 26, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    371
  3. lhak
    Replies:
    0
    Views:
    517
  4. Namratha Shah \(Nasha\)

    Article : .NET Framework Configuration Tool (Mscorcfg.msc)

    Namratha Shah \(Nasha\), Nov 24, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    3,202
    Namratha Shah \(Nasha\)
    Nov 24, 2004
  5. Mark
    Replies:
    0
    Views:
    830
Loading...

Share This Page