Remove inherited web.config values that are duplicates

Discussion in 'ASP .Net' started by Jesper Mortensen, Jul 6, 2009.

  1. Hi

    I'm running a web application at the root and other separate web applications
    in sub directories, which means settings are inherited from the root
    web.config to the sub web.configs.

    Now I'd like to remove values set in the sub web.config that are the same as
    the inherited value. This would make it easier to administrate the
    web.configs. I've searched without finding anything useful. How could I go
    about this? I thought about merging the web.configs to one big XML file and
    do some XSLT. Does anyone know of code or utility that can do the job?
    Jesper Mortensen, Jul 6, 2009
    #1
    1. Advertising

  2. Jesper Mortensen

    Stan Guest

    On 6 July, 17:29, "Jesper Mortensen" <> wrote:
    > Hi
    >
    > I'm running a web application at the root and other separate web applications
    > in sub directories, which means settings are inherited from the root
    > web.config to the sub web.configs.
    >
    > Now I'd like to remove values set in the sub web.config that are the same as
    > the inherited value. This would make it easier to administrate the
    > web.configs. I've searched without finding anything useful. How could I go
    > about this? I thought about merging the web.configs to one big XML file and
    > do some XSLT. Does anyone know of code or utility that can do the job?


    Hi

    As an alternative to proliferating web.config files you can vary
    settings in sub-folders from the root web.config with <location>
    sections.

    For example:

    <location path="subFolder1">
    <system.web>
    <authorization>
    <allow users="admin" />
    <deny users="*" />
    </authorization>
    </system.web>
    </location>

    Which will restrict access to user admin only in subFolder1

    HTH
    Stan, Jul 6, 2009
    #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. Benny Ng
    Replies:
    9
    Views:
    9,880
    Benny Ng
    Oct 13, 2005
  2. Steven Bethard
    Replies:
    11
    Views:
    1,000
    Alex Martelli
    Feb 7, 2005
  3. CSharpner
    Replies:
    0
    Views:
    976
    CSharpner
    Apr 9, 2007
  4. bob

    remove duplicates?

    bob, Sep 5, 2011, in forum: Java
    Replies:
    4
    Views:
    396
    Roedy Green
    Sep 5, 2011
  5. 7stud --
    Replies:
    11
    Views:
    373
    7stud --
    Nov 9, 2007
Loading...

Share This Page