Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4597008
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T23:11:47+00:00 2026-05-21T23:11:47+00:00

We use security trimming in our web app, so nodes like the following are

  • 0

We use security trimming in our web app, so nodes like the following are necessary:

<location path="admin/employees" xdt:Transform="Replace" xdt:Locator="Match(path)">
    <system.web>
        <authorization>
            <allow roles="domain\role1,domain\role2"/>
            <deny users="*"/>
        </authorization>
    </system.web>
</location>

<location path="admin/whatever" xdt:Transform="Replace" xdt:Locator="Match(path)">
    <system.web>
        <authorization>
            <allow roles="domain\role1,domain\role2"/>
            <deny users="*"/>
        </authorization>
    </system.web>
</location>

Notice that we also do transformation. Since the roles vary from the various environments we have (dev, staging, and production), it’s quite tedious to implement transformation across all three configurations.

What I would like to do is encapsulate all location nodes into a parent node, perhaps called <locations>. That way, I could implement transformation on the locations node instead each location node like this:

<locations xdt:Transform="Replace">
    <location path="admin/employees">
        <system.web>
            <authorization>
                <allow roles="domain\role1,domain\role2"/>
                <deny users="*"/>
            </authorization>
        </system.web>
    </location>

    <location path="admin/whatever">
        <system.web>
            <authorization>
                <allow roles="domain\role1,domain\role2"/>
                <deny users="*"/>
            </authorization>
        </system.web>
    </location>
</locations>

Is this possible?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T23:11:48+00:00Added an answer on May 21, 2026 at 11:11 pm

    Unless you want to write some custom bits to run after a deploy, you are stuck with the MS Build transform. Yes, it is a bit tedious to have to set up each environment, but that is the nature of beast right now.

    I have use Nant in the past to build and conquer some of the transformation issues. A bit less tedious, for some, but still tedious.

    I wish I had a better story for you.

    Since you are using locations, you can also set up the common bits in folders and set up a specific web.config. Still tedious, but might be less of a pain than a single web.config file at root.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I use Spring Security 3 in my jsf2 web app. When a non-authenticated user
I use Spring Security and Apache proxy for a web app. When using standard
I have the following in my web.config: <location path=RestrictedPage.aspx> <system.web> <authorization> <allow roles=Group1Admin, Group3Admin,
I have tried to use security-constraint in web.xml. I gave permission to admin by
At my project I use Spring Security and GWT with url-like internationalization (http://....html?locale=en). Login
I'm developing a web application that use Spring Security for authentication of users. I
I am trying to implement web services that use different security mechanisms to do
I have web service, which use integrated security in IIS. Now, I want to
I use Spring MVC [version: 2.5] and Security[version: 2.0.4]. My problem looks like that:
The security policy at our client's production environment requires that we use separate connection

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.