473,772 Members | 3,712 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Active Directory - Groups and Permissions

I'm creating an intranet site that uses Forms authentication to
validate users against an Active Directory. Users need to be able to
login both from work and remotely. Then I want to be able to do two
things: (1) Check whether a user is in an AD group and (2) enforce NTFS
permissions based on AD username.

First scenario: "Joe" logs in to the web site from home using his
domain username and password. Joe should see certain content on the web
site based on his AD group membership. Let's say he's in Marketing, so
I'd like to be able to check whether User.IsInRole(" Marketing"). Right
now when I try that, I get a message saying: "Method is only supported
if the user name parameter matches the user name in the current Windows
Identity." Is this because I've set the app to use the
AspNetWindowsTo kenRoleProvider ? Does that only work if he is physically
logged into a computer on the AD domain? Is there a way to emulate the
Windows Identity? Or should I be using a different role provider?

Second scenario: Joe has certain permissions to network resources that
need to be enforced. For example, a web folder (WebDAV) with financial
data allows members in group "Marketing" read access only. It is
enforced when he physically logs into the AD domain at work, but it
should also be enforced when he logs in from the road. Right now I'm
using <identity impersonate="tr ue"/> - hoping it will use his username
"Joe" rather than the ASP.NET worker process to access that folder. Is
that the right way to approach the problem?

Currently I'm developing the site on a Windows XP machine using VS2005
and the built-in ASP web server. The production web server will be
Windows 2003, and the AD domain itself is Windows 2000. Any help is
much appreciated. Here are the relevant snippets from my web.config
file:

<connectionStri ngs>
<add name="ADConnect ionString"
connectionStrin g="LDAP://machine.domain. com/CN=Users,DC=mac hine,DC=domain, DC=com"
/>
</connectionStrin gs>

<roleManager enabled="true"
defaultProvider ="AspNetWindows TokenRoleProvid er" />

<identity impersonate="tr ue"/>

<authenticati on mode="Forms">
<forms name=".ADAuthCo okie" timeout="10" />
</authentication>

<authorizatio n>
<deny users="?" />
<allow users="*" />
</authorization>

<membership defaultProvider ="MyADMembershi pProvider">
<providers>
<add name="MyADMembe rshipProvider"
type="System.We b.Security.Acti veDirectoryMemb ershipProvi der"
connectionStrin gName="ADConnec tionString"
connectionUsern ame="domain\use r" connectionPassw ord="password"
attributeMapUse rname="sAMAccou ntName" enableSearchMet hods="true" />
</providers>
</membership>

May 2 '06 #1
2 1755
Anyone have any tips on this? Even any general resources about how to
harness Active Directory on an ASP.NET 2.0 intranet?

May 16 '06 #2
http://lab.msdn.microsoft.com/search...+%22asp.net%22

Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
=============== =============== =====
"Scott" <sc**********@g mail.com> wrote in message
news:11******** **************@ y43g2000cwc.goo glegroups.com.. .
Anyone have any tips on this? Even any general resources about how to
harness Active Directory on an ASP.NET 2.0 intranet?


May 16 '06 #3

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

Similar topics

1
4755
by: Andrew | last post by:
Hey all, Working on revamping our Intranet here and making use of the LDPA, Active Directory, Directory Services, etc. that .Net provides. I am still fairly new on this subject, so the problem I have run into I am not sure how to fix, and really not sure what is causing it. Here's what is going on (test server - Windows 2003 Server): I have a page in a folder (under anonymous authentication in IIS6) that has a link on it that...
1
3895
by: tangus via DotNetMonster.com | last post by:
Hello all, I'm really struggling with getting some Active Directory code to work in ASP.NET. Can you please provide assistance? I am executing the following code: Dim enTry As DirectoryEntry = New DirectoryEntry("LDAP://domain") Dim mySearcher As New DirectorySearcher(enTry) Dim resEnt As SearchResult mySearcher.Filter = ("(objectClass=*)") mySearcher.SearchScope = SearchScope.Subtree
4
1391
by: Patirck Ige | last post by:
Would it be easier to have an intranetsystem built based on some security gruopson Active directory or having to use a Database to have a validation store and Roles. Which way would be the best to go?
4
2351
by: Patrick.O.Ige | last post by:
If i want to generate a menu structure depending on who is logged in in an intranet system(using windows authentication) is it better to use the GROUPS in Active Directory or to move the Active Directory groups into a Sql Server database and base the authrorization and authentication on the SQL Server roles/groups? Whats the best way to make use of the GROUPS in active directory to authorize users apart from using web.config where you...
2
1354
by: Derek Martin | last post by:
Hey everyone. I am designing a new application that has a need for several different permission sets, ie., which functions of the app are turned on based on who you are. I would like to reference active directory groups for these permissions instead of using some contrived login/logout system and storing permission sets. This would require me to both reference AD groups for users and get the user's currently logged in information. ...
0
2507
by: bcanter | last post by:
I found a file on the web that will allow you to enumerate groups but it was an .hta and the top level admins won't allow this. I need to give managers access to the groups so that when a new user is created they can tell me who they want their account to be modeled after. The html app works great as a .hta file but when it is saved as a web page it won't list the members of any groups. I get an error on line 182: "ActiveX component can't create...
2
9278
by: Max Vit | last post by:
I have been toying with the idea of having an Active Directory authentication / authorisation functionality in MS Access; but there is not much useful info around. I have built these functionalities for some applications (JAVA, PHP). The parameters used there are the LDAP parameters for AD: *searchFilter: (objectClass=user) *searchBase: OU=register,OU=applications,DC=inside,DC=mycompany,DC=com *adminPassword: Password
4
8279
by: Spam Catcher | last post by:
Hello All, I need to integrate my application into Active Directory. My application has the concept of groups, users, and also individual permissions. Users can be part of a group such as administrators, but explicit permissions may also be set. Can active directory handle this too? For example: Administrators can typically add/remove/edit/delete an item,
1
4062
by: Tim | last post by:
Folks, I have 3 loosely linked problems which I am would appreciate feedback on. 1). T-Sql and Active directory roles. We want to be able to control access to data within a table based on a role within Active directory. For example, Region1 has 4 sites, Region 2 has 3 sites and so forth. All the sites are held in a single database table.
0
9620
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9454
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10038
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8934
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7460
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6715
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5482
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4007
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3609
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.