ASP.NET 2.0 Role provider question

  • Thread starter Thread starter Derrick
  • Start date Start date
D

Derrick

Morning,

I am using the built in asp.net role/user/membership, etc. Have that all
working.

We have some internal users, and a bunch of external users.

Is there any way to remove roles at run time, per request, based on the ip
of the request? What I want to do is remove all the "admin" type roles for
internet based users, only allow certain roles to apply if the request comes
from our intranet.

If there isn't an "easy" way to do this, I guess I would have to get the
role provider source and modify it myself?

Thanks in advance!

Derrick
 
You can create your own custom role provider that allows this
programatically.

If it is a matter of removing roles from a certain site, you can do that by
making it so the roles in question are denied access in web.config. Won't
stop a login, but it will prevent them from doing anything on the site when
logged in. This will not work, of course, if both sets are hitting the same
exact site.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
http://gregorybeamer.spaces.live.com
Co-author: Microsoft Expression Web Bible (upcoming)

************************************************
Think outside the box!
************************************************
 
Back
Top