Dynamic page security authorization?

C

Craig Vedur

Hey,

My client wants to implement some sort of dynamic location role-based
security rule for a web app. Normally, in my web.config, I define the
location authorization rules such as:

<location path="WebForm.aspx">
<system.web>
<authorization><allow roles="Employee" /></authorization>
</system.web>
</location>

However, he wants to build an admin page that will keep track of pages and
role access in a database.

How can you implement this sort of 'dynmaic page authorization'? Obviously,
I can't define the rules in the web.config anymore.

Anybody have any ideas? Is it possible to add these rules at runtime?
Thanks
 
D

Dominick Baier [DevelopMentor]

Hello Craig,

the Authorize_Request event in the HttpPipeline is what you are looking for.
Here you get information like the identity of the user, his role memberships
and the requested resource. You can dynamically determine if the use is authorized
and cancel the request/pass back 401 if you like.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top