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 8463813
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T14:33:33+00:00 2026-06-10T14:33:33+00:00

I am studying for a Microsoft exam and am going through some sample questions.

  • 0

I am studying for a Microsoft exam and am going through some sample questions. I have this question:

“You are developing an ASP.NET Web Application which is configured to use the membership and role providers.

You need to allow all users to perform a HTTP GET but must allow only the user named Moderator to perform a POST operation. Which configuration should you add to the web.config file?”

<authorization>
  <deny verbs="POST" users="*" />
  <allow verbs="POST" users="Moderator" />
  <allow verbs="GET" users="*" />
</authorization>

<authorization>
  <allow verbs="GET" users="*" />
  <allow verbs="POST" users="Moderator" />
  <deny verbs="POST" users="*" />
</authorization>

There were two other answers but they were obviously wrong so I haven’t replicated them here.

The only difference I can spot between the two sets of rules is the order in which the rules are placed.

The correct answer is the second set of rules. Here the rule first Allows POST access for “Moderator” and then removes it for everyone else. This seems counter-intuitive to me – to give 1 person a privilege, then remove that privilege from everyone and yet the 1 person still has the privilege afterwards.

If anything the first set of rules makes more sense – first deny everyone then selectively give access to individuals. Apparently this is wrong though!

Can anyone explain why this is the case so I can understand this better?

  • 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-06-10T14:33:34+00:00Added an answer on June 10, 2026 at 2:33 pm

    This is just a case of first come first served. ASP.NET processes the rules in order until it hits one that matches, therefore in the first scenario it will hit the deny rule for POST before it reaches the allow.

    If anything the first set of rules makes more sense – first deny everyone then selectively give access to individuals.

    That’s not quite how it works. The rules are checked per request, therefore, what the first rules are basically saying is:

    1. Deny all POST requests from everyone.
    2. Allow POST requests for Moderator.
    3. Allow GET requests for everyone.

    All in that order. The problem here is when Moderator sends in a POST request, it will match the first rule (as it’s for everyone) and be denied. However, the second scenario is saying:

    1. Allow GET requests for everyone.
    2. Allow POST requests for Moderator.
    3. Deny POST requests for everyone.

    So when Moderator sends a Post request, it will match the 2nd rule and allow the request to continue. If anyone else sends in a POST request, they will hit the 3rd rule and be denied.

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

Sidebar

Related Questions

I came across this question while studying for the Microsoft Web-Application Developer exam, You
I am preparing for an exam and studying questions. However I have one question
While studying C# in ASP.net I have trouble understanding several classes. In which scenario
While studying for the SCJP 6 exam, I ran into this question in a
I want to write a web site using ASP.NET MVC 3.0 and Microsoft technologies.
I'm studying up for a Microsoft Certification exam, and some of the wording for
Studying MS Exam 70-536 .Net Foundation I've got to Chapter 11 Application Security and
While studying for a Functional Programming exam, I came across the following questions from
While studying for a Functional Programming exam, I came across the following question from
I'm working on a web site where the new pages are ASP.NET and the

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.