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. ASP.NET
  4. Authorization in web.config is giving me heartburn

Authorization in web.config is giving me heartburn

Scheduled Pinned Locked Moved ASP.NET
securitydatabasequestion
4 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.
  • G Offline
    G Offline
    gantww
    wrote on last edited by
    #1

    We have a fairly large project with a lot of roles and a lot of pages. For a time, we've been using location elements in the web.config to manage security, but it is starting to get unmaintainable. What I would really like is some sort of way that I can authorize or deny a request based on the user's permissions that doesn't involve tampering with a config file. Ideally, this thing should get its data either from a database or by being hardcoded (for instance, it would be awesome if there was a nice fluent interface that I could use for this). Does anyone have any suggestions? Will

    C 1 Reply Last reply
    0
    • G gantww

      We have a fairly large project with a lot of roles and a lot of pages. For a time, we've been using location elements in the web.config to manage security, but it is starting to get unmaintainable. What I would really like is some sort of way that I can authorize or deny a request based on the user's permissions that doesn't involve tampering with a config file. Ideally, this thing should get its data either from a database or by being hardcoded (for instance, it would be awesome if there was a nice fluent interface that I could use for this). Does anyone have any suggestions? Will

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      I'd build a permissions system into the database, which has the advantage that you can give admins the UI to change it. Create groups for your users and apply permissions to pages on the group level.

      Christian Graus Driven to the arms of OSX by Vista. "I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )

      G 1 Reply Last reply
      0
      • C Christian Graus

        I'd build a permissions system into the database, which has the advantage that you can give admins the UI to change it. Create groups for your users and apply permissions to pages on the group level.

        Christian Graus Driven to the arms of OSX by Vista. "I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )

        G Offline
        G Offline
        gantww
        wrote on last edited by
        #3

        I guess what I'm stuck on is where to put the code that restricts the user from hitting certain pages. Would that go in global.asax somewhere or out on the page? Or should I make some sort of custom handler for it? Sorry, I'm a bit thick today. Will

        C 1 Reply Last reply
        0
        • G gantww

          I guess what I'm stuck on is where to put the code that restricts the user from hitting certain pages. Would that go in global.asax somewhere or out on the page? Or should I make some sort of custom handler for it? Sorry, I'm a bit thick today. Will

          C Offline
          C Offline
          Christian Graus
          wrote on last edited by
          #4

          I would write a base class for all pages, and have a property specifying what group the page belongs to. Then I'd set the code in each page and check the user in the base class.

          Christian Graus Driven to the arms of OSX by Vista. "I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )

          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