AD Group Memberships (MyADMembershipProvider) Question

A

Andy Melick

All,

I am using MyADMembershipProvider as my membership provider to authenticate
to my application via Active Directory. I have found how I can allow / deny
authorization for users via <authorization> section in the web.config.

What is a method to search users membership to return all the groups they
are a member of. This is for use in a portal and in classic asp I used to do
the following:

'Check to see if user is member of nco-account-admin for network tools
access
Set GroupObj = GetObject("WinNT://" & DomainString & "/" & GroupString)
For each UserObj in GroupObj.Members
If UserObj.Name = Request.Form("username") then
session("networktools") = "true"
else
end if

Next

How do I go about doing the same thing in ASP.NET 2.0?

Thanks in advance for any help!
 
J

Joe Kaplan

We have some nice samples of this stuff in our book. There is a low level
sample on group membership expansion in ch 10, which you can download for
free from the link in my sig, along with the source code.

My co-author, Ryan Dunn, also put together an experimental AD group role
provider that integrates with the ASP.NET 2.0 role provider framework. You
might want to take a look at that.

Unfortunately, his blog seems to be a little hosed right now, but I'll email
him and see if he can get it working again. Here's the link:

http://www.dunnry.com/blog/
 

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,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top