Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. Configuration Error

Configuration Error

Scheduled Pinned Locked Moved Web Development
securitysysadminwindows-adminhelpquestion
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Richard Andrew x64R Offline
    Richard Andrew x64R Offline
    Richard Andrew x64
    wrote on last edited by
    #1

    I configured my website in IIS to use Windows Authentication, and it works when I don't try to add Authorization Rules. However, I added an Allow rule to allow only users in the Administrators group, and it gives the below error when attempting to load the page: HTTP Error 500.19 - Internal Server Error

    Quote:

    Cannot add duplicate collection entry of type 'add' with combined key attributes 'users, roles, verbs' respectively set to ', Administrators, '

    This is what my web config looks like: <security> <authorization> <remove users="*" roles="" verbs="" /> <add accessType="Allow" users="" roles="Administrators" /> </authorization> </security> Can anyone see what I'm doing wrong?

    The difficult we do right away... ...the impossible takes slightly longer.

    R 1 Reply Last reply
    0
    • Richard Andrew x64R Richard Andrew x64

      I configured my website in IIS to use Windows Authentication, and it works when I don't try to add Authorization Rules. However, I added an Allow rule to allow only users in the Administrators group, and it gives the below error when attempting to load the page: HTTP Error 500.19 - Internal Server Error

      Quote:

      Cannot add duplicate collection entry of type 'add' with combined key attributes 'users, roles, verbs' respectively set to ', Administrators, '

      This is what my web config looks like: <security> <authorization> <remove users="*" roles="" verbs="" /> <add accessType="Allow" users="" roles="Administrators" /> </authorization> </security> Can anyone see what I'm doing wrong?

      The difficult we do right away... ...the impossible takes slightly longer.

      R Offline
      R Offline
      Richard Deeming
      wrote on last edited by
      #2

      That matches the configuration sample in the documentation: Security Authorization <authorization> | Microsoft Learn[^] Based on the error, it sounds like you have authorization rules configured further up the hierarchy - either a parent folder, a parent application, or machine-wide. You could try using IIS Manager to look at the configured rules, using the "Authorization Rules" option in the IIS group rather than the ".NET Authorization Rules" in the ASP.NET group. As a brute-force approach, you could clear the rules first:

      <security>
      <authorization>
      <clear />
      <add accessType="Allow" users="" roles="Administrators" />
      </authorization>
      </security>


      "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

      Richard Andrew x64R 1 Reply Last reply
      0
      • R Richard Deeming

        That matches the configuration sample in the documentation: Security Authorization <authorization> | Microsoft Learn[^] Based on the error, it sounds like you have authorization rules configured further up the hierarchy - either a parent folder, a parent application, or machine-wide. You could try using IIS Manager to look at the configured rules, using the "Authorization Rules" option in the IIS group rather than the ".NET Authorization Rules" in the ASP.NET group. As a brute-force approach, you could clear the rules first:

        <security>
        <authorization>
        <clear />
        <add accessType="Allow" users="" roles="Administrators" />
        </authorization>
        </security>


        "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

        Richard Andrew x64R Offline
        Richard Andrew x64R Offline
        Richard Andrew x64
        wrote on last edited by
        #3

        Thanks, Richard. I didn't realize the multilayered nature of the settings. I made sure that the settings on the server, website and application were all the same, and now it works. :)

        The difficult we do right away... ...the impossible takes slightly longer.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups