473,398 Members | 2,393 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,398 software developers and data experts.

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
AspNetWindowsTokenRoleProvider? 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="true"/> - 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:

<connectionStrings>
<add name="ADConnectionString"
connectionString="LDAP://machine.domain.com/CN=Users,DC=machine,DC=domain,DC=com"
/>
</connectionStrings>

<roleManager enabled="true"
defaultProvider="AspNetWindowsTokenRoleProvider" />

<identity impersonate="true"/>

<authentication mode="Forms">
<forms name=".ADAuthCookie" timeout="10" />
</authentication>

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

<membership defaultProvider="MyADMembershipProvider">
<providers>
<add name="MyADMembershipProvider"
type="System.Web.Security.ActiveDirectoryMembershi pProvi der"
connectionStringName="ADConnectionString"
connectionUsername="domain\user" connectionPassword="password"
attributeMapUsername="sAMAccountName" enableSearchMethods="true" />
</providers>
</membership>

May 2 '06 #1
2 1737
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**********@gmail.com> wrote in message
news:11**********************@y43g2000cwc.googlegr oups.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
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...
1
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 =...
4
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...
4
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...
2
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...
0
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...
2
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...
4
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...
1
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...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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,...
0
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...

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.