473,324 Members | 1,856 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

ASP.NET 2.0 Role provider question

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
Jul 27 '07 #1
1 1197
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!
************************************************
"Derrick" <de*********@excite.comwrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl...
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

Jul 27 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Hennie | last post by:
Ho can I get the role of the user in a ASP.net 2.0 web application? I am using AspNetSqlProvider to manage my membership. I can get the user by using User.Identity.Name. What will the command be to...
0
by: John | last post by:
Hi This is my first time doing this. I have a typical sql server and vs2005/sql express 2005 installation on C: drive. I have attached the web config file that I am using. I have the...
1
by: ^MisterJingo^ | last post by:
Hi, If I add a database to my application (vs2005) and use the membership and role controls, VS seems to set up all the tables automatically. Where does it store all this configuration...
1
by: CK | last post by:
Does anyone have any experience with this? We have an exisitng sql database with user and role info. I need to write a custom role provider to use this data. Does anyone have any examples of this...
6
by: dotNeter | last post by:
The services, talked here, are things used in IServiceContainer, IServiceProvider, etc. In my opinion, everything can be a service, and a service is generally used for providing specific features...
7
by: Tom Van den Brandt | last post by:
Hi all! I'm trying to implement a custom roleprovider in asp.net. The new roleprovider works fine when I access it programmaticaly. However, it doesn't seem to work with the standard controls....
1
by: Erich Peterson | last post by:
Hi. I'm wondering if there is a way to switch the Membership and Role provider during runtime (or at least the connectionStringName attribute), so that my site can switch between using the...
4
by: alexandis | last post by:
We have tables of logins (users), that differs much from standard microsoft structure - we don't use control question/answer, date fields, etc. But instead we have several additional fields. I...
2
by: James Crosswell | last post by:
I have a custom role provider and custom membership provider in my ASP.NET app. These work fine on my local box. When deploying the app I'm getting the following error: Description: An error...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.