Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Security > Forms Authentication - Active Directory

Reply
Thread Tools

Forms Authentication - Active Directory

 
 
oriol.ardevol@gmail.com
Guest
Posts: n/a
 
      06-11-2007
Hi,

I have an asp.net 2.0 application with forms authentication. I am
authenticating the users to an Active Directory Server with
ActiveDirectoryMembershipProvider which works as expected and users
get authenticated.

What I am trying to do is to get also the role information from the
Active Directory Server with the groups where the users belong to.

Is there any way to achieve it ? Can it be done by enabling some
provider in the role manager section of the web.config file ?

any help will be appreciated, thx in advance,
ori

 
Reply With Quote
 
 
 
 
Alexey Smirnov
Guest
Posts: n/a
 
      06-11-2007
On Jun 11, 10:48 am, (E-Mail Removed) wrote:
> Hi,
>
> I have an asp.net 2.0 application with forms authentication. I am
> authenticating the users to an Active Directory Server with
> ActiveDirectoryMembershipProvider which works as expected and users
> get authenticated.
>
> What I am trying to do is to get also the role information from the
> Active Directory Server with the groups where the users belong to.
>
> Is there any way to achieve it ? Can it be done by enabling some
> provider in the role manager section of the web.config file ?
>
> any help will be appreciated, thx in advance,
> ori


You would need a role provider.

WindowsTokenRoleProvider for using Active Directory groups as roles
AuthorizationStoreProvider - for Windows 2003 and ADAM
SqlRoleProvider for storing roles in SQL Server

More about WindowsTokenRoleProvider
http://msdn2.microsoft.com/en-us/lib...eprovider.aspx

 
Reply With Quote
 
 
 
 
Dominick Baier
Guest
Posts: n/a
 
      06-11-2007
They are all not very helpful in your situation.

The WindowsTokenRoleProvider only works with windows auth - not forms.

Ryan an me have written an ActiveDirectoryRoleProvider - which seems to work
for most people...

i can send you the code if you are interested...


-----
Dominick Baier (http://www.leastprivilege.com)

Developing More Secure Microsoft ASP.NET 2.0 Applications (http://www.microsoft.com/mspress/books/9989.asp)

> On Jun 11, 10:48 am, (E-Mail Removed) wrote:
>
>> Hi,
>>
>> I have an asp.net 2.0 application with forms authentication. I am
>> authenticating the users to an Active Directory Server with
>> ActiveDirectoryMembershipProvider which works as expected and users
>> get authenticated.
>>
>> What I am trying to do is to get also the role information from the
>> Active Directory Server with the groups where the users belong to.
>>
>> Is there any way to achieve it ? Can it be done by enabling some
>> provider in the role manager section of the web.config file ?
>>
>> any help will be appreciated, thx in advance,
>> ori

> You would need a role provider.
>
> WindowsTokenRoleProvider for using Active Directory groups as roles
> AuthorizationStoreProvider - for Windows 2003 and ADAM SqlRoleProvider
> for storing roles in SQL Server
>
> More about WindowsTokenRoleProvider
> http://msdn2.microsoft.com/en-us/lib...rity.windowsto
> kenroleprovider.aspx



 
Reply With Quote
 
oriol.ardevol@gmail.com
Guest
Posts: n/a
 
      06-11-2007
I had already tried those solutions.

WindowsTokenAuthenticationProvider does'nt works for Forms
Authentication as Dominick pointed, and I couldn't managed to get
AuthorizationStoreProvider to work (ended up getting some weird
COMException error which I already posted in this group last week)

Finally, I developed my own role provider which accesed the active
directory and got the role information.

Thanks for everything,
ori

 
Reply With Quote
 
Alexey Smirnov
Guest
Posts: n/a
 
      06-11-2007
On Jun 11, 1:06 pm, (E-Mail Removed) wrote:
> I had already tried those solutions.
>
> WindowsTokenAuthenticationProvider does'nt works for Forms
> Authentication as Dominick pointed, and I couldn't managed to get
> AuthorizationStoreProvider to work (ended up getting some weird
> COMException error which I already posted in this group last week)
>
> Finally, I developed my own role provider which accesed the active
> directory and got the role information.
>
> Thanks for everything,
> ori


Ah, yes, Dominick and you were right, I've missed that you asked about
the Forms Authentication. Sorry!

 
Reply With Quote
 
Joe Kaplan
Guest
Posts: n/a
 
      06-11-2007
FYI, Ryan's LDAP-based AD/ADAM Role Provider is posted on Code Plex now in
case anyone wants it or wishes to contribute.

Joe K.

--
Joe Kaplan-MS MVP Directory Services Programming
Co-author of "The .NET Developer's Guide to Directory Services Programming"
http://www.directoryprogramming.net
--
"Dominick Baier" <dbaier@pleasepleasenospam_leastprivilege.com> wrote in
message news:(E-Mail Removed) om...
> They are all not very helpful in your situation.
>
> The WindowsTokenRoleProvider only works with windows auth - not forms.
>
> Ryan an me have written an ActiveDirectoryRoleProvider - which seems to
> work for most people...
>
> i can send you the code if you are interested...
>
>
> -----
> Dominick Baier (http://www.leastprivilege.com)
>
> Developing More Secure Microsoft ASP.NET 2.0 Applications
> (http://www.microsoft.com/mspress/books/9989.asp)
>
>> On Jun 11, 10:48 am, (E-Mail Removed) wrote:
>>
>>> Hi,
>>>
>>> I have an asp.net 2.0 application with forms authentication. I am
>>> authenticating the users to an Active Directory Server with
>>> ActiveDirectoryMembershipProvider which works as expected and users
>>> get authenticated.
>>>
>>> What I am trying to do is to get also the role information from the
>>> Active Directory Server with the groups where the users belong to.
>>>
>>> Is there any way to achieve it ? Can it be done by enabling some
>>> provider in the role manager section of the web.config file ?
>>>
>>> any help will be appreciated, thx in advance,
>>> ori

>> You would need a role provider.
>>
>> WindowsTokenRoleProvider for using Active Directory groups as roles
>> AuthorizationStoreProvider - for Windows 2003 and ADAM SqlRoleProvider
>> for storing roles in SQL Server
>>
>> More about WindowsTokenRoleProvider
>> http://msdn2.microsoft.com/en-us/lib...rity.windowsto
>> kenroleprovider.aspx

>
>



 
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
Forms Authentication with Active Directory LDAP Problem Tdar ASP .Net 2 10-11-2005 08:52 PM
Asp.Net Forms authentication using Active Directory =?Utf-8?B?RWdiZXJ0?= ASP .Net 0 11-03-2004 11:49 AM
Forms Authentication and Active Directory - Steve - ASP .Net 7 06-04-2004 09:32 PM
Forms Authentication +Active Directory +Roles Marty Underwood ASP .Net 4 10-30-2003 01:54 AM
Impersonation failure with Index Server and Forms Authentication with Active Directory techfuzz ASP .Net 1 08-12-2003 05:54 AM



Advertisments