Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Security > AD Group Memberships (MyADMembershipProvider) Question

Reply
Thread Tools

AD Group Memberships (MyADMembershipProvider) Question

 
 
Andy Melick
Guest
Posts: n/a
 
      10-16-2006
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!


 
Reply With Quote
 
 
 
 
Joe Kaplan
Guest
Posts: n/a
 
      10-16-2006
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/

--
Joe Kaplan-MS MVP Directory Services Programming
Co-author of "The .NET Developer's Guide to Directory Services Programming"
http://www.directoryprogramming.net
--
"Andy Melick" <(E-Mail Removed)12.oh.us> wrote in message
news:(E-Mail Removed)...
> 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!
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with ASP.NET Memberships Jonathan Wood ASP .Net 13 10-18-2007 01:01 AM
Roles and Memberships Ron ASP .Net Security 1 05-17-2006 11:37 PM
Cross Forest Group Memberships tyler.lloyd@gmail.com ASP .Net Security 12 02-08-2006 06:50 PM
Some charter memberships still available. PoppinFresh MCDST 1 09-15-2004 04:56 PM
Creating site memberships Mike HTML 5 04-29-2004 04:47 PM



Advertisments