Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Security > ASP.NET 2.0 - Windows Auth and Roles

Reply
Thread Tools

ASP.NET 2.0 - Windows Auth and Roles

 
 
Mark Parter
Guest
Posts: n/a
 
      05-02-2005
Is it possible to use Windows authentication and the builtin role provider
in ASP.NET 2 Beta 2?

The intranet app I'm developing uses Windows authentication but I'd like to
give an administrator the power to add roles (to the aspnetdb database) and
add Windows users to these roles.

It seems I can achieve the first option, creating the roles. But if I try to
add a Windows user to the role, the "search" function never finds them, I'm
assuming it's searching it's own database.

I'm a bit unclear about how the how the roles provider works in conjunction
with Windows authentication as most of the articles I've come across involve
forms authentication.
 
Reply With Quote
 
 
 
 
Brock Allen
Guest
Posts: n/a
 
      05-02-2005
Yes it's possible. The built in admin tools can't search all the possible
windows accounts, though, to configure. You'll have to manually call Roles.AddUserToRole.

-Brock
DevelopMentor
http://staff.develop.com/ballen



> Is it possible to use Windows authentication and the builtin role
> provider in ASP.NET 2 Beta 2?
>
> The intranet app I'm developing uses Windows authentication but I'd
> like to give an administrator the power to add roles (to the aspnetdb
> database) and add Windows users to these roles.
>
> It seems I can achieve the first option, creating the roles. But if I
> try to add a Windows user to the role, the "search" function never
> finds them, I'm assuming it's searching it's own database.
>
> I'm a bit unclear about how the how the roles provider works in
> conjunction with Windows authentication as most of the articles I've
> come across involve forms authentication.
>




 
Reply With Quote
 
 
 
 
Mark Parter
Guest
Posts: n/a
 
      05-02-2005
Thanks for your reply Brock.

So I have to create a form to programmatically add users to these roles?

Just to clarify, this is will work for adding Windows accounts to roles
stored in the database?

Thanks,

Mark

"Brock Allen" wrote:

> Yes it's possible. The built in admin tools can't search all the possible
> windows accounts, though, to configure. You'll have to manually call Roles.AddUserToRole.
>
> -Brock
> DevelopMentor
> http://staff.develop.com/ballen
>
>
>
> > Is it possible to use Windows authentication and the builtin role
> > provider in ASP.NET 2 Beta 2?
> >
> > The intranet app I'm developing uses Windows authentication but I'd
> > like to give an administrator the power to add roles (to the aspnetdb
> > database) and add Windows users to these roles.
> >
> > It seems I can achieve the first option, creating the roles. But if I
> > try to add a Windows user to the role, the "search" function never
> > finds them, I'm assuming it's searching it's own database.
> >
> > I'm a bit unclear about how the how the roles provider works in
> > conjunction with Windows authentication as most of the articles I've
> > come across involve forms authentication.
> >

>
>
>
>

 
Reply With Quote
 
Brock Allen
Guest
Posts: n/a
 
      05-02-2005
> So I have to create a form to programmatically add users to these
> roles?


Well, if the admin tool can't or doesn't know how to show the right list
of users then, yeah, you'll have to make your own. I just ran a check, and
even though I have configured Windows auth, the Role management shows the
users frm the SqlMembershipProvider. Dumb, huh?

> Just to clarify, this is will work for adding Windows accounts to
> roles stored in the database?


Yep. I tested this recently (don't remember if it was under beta 2 or not,
but it should be fine).

-Brock
DevelopMentor
http://staff.develop.com/ballen



 
Reply With Quote
 
Mark Parter
Guest
Posts: n/a
 
      05-02-2005
OK, thanks again.

"Brock Allen" wrote:

> > So I have to create a form to programmatically add users to these
> > roles?

>
> Well, if the admin tool can't or doesn't know how to show the right list
> of users then, yeah, you'll have to make your own. I just ran a check, and
> even though I have configured Windows auth, the Role management shows the
> users frm the SqlMembershipProvider. Dumb, huh?
>
> > Just to clarify, this is will work for adding Windows accounts to
> > roles stored in the database?

>
> Yep. I tested this recently (don't remember if it was under beta 2 or not,
> but it should be fine).
>
> -Brock
> DevelopMentor
> http://staff.develop.com/ballen
>
>
>
>

 
Reply With Quote
 
Mark Parter
Guest
Posts: n/a
 
      05-02-2005
OK, thanks again.

"Brock Allen" wrote:

> > So I have to create a form to programmatically add users to these
> > roles?

>
> Well, if the admin tool can't or doesn't know how to show the right list
> of users then, yeah, you'll have to make your own. I just ran a check, and
> even though I have configured Windows auth, the Role management shows the
> users frm the SqlMembershipProvider. Dumb, huh?
>
> > Just to clarify, this is will work for adding Windows accounts to
> > roles stored in the database?

>
> Yep. I tested this recently (don't remember if it was under beta 2 or not,
> but it should be fine).
>
> -Brock
> DevelopMentor
> http://staff.develop.com/ballen
>
>
>
>

 
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
Roles and Windows Auth - From custom Admin tool instead? mgonzales3 ASP .Net Security 1 06-29-2006 06:59 PM
windows auth and forms auth Smokey Grindle ASP .Net 1 06-08-2006 03:14 PM
Form Auth and windows int auth cs ASP .Net Security 1 04-28-2006 03:05 PM
Membership Roles and Windows Auth - CSLA.net ? =?Utf-8?B?bWdvbnphbGVzMw==?= ASP .Net 0 04-20-2006 10:03 PM
Configuring Windows Auth & Forms Auth in Asp.Net =?Utf-8?B?Q2hyaXMgTW9oYW4=?= ASP .Net 0 04-28-2004 06:11 PM



Advertisments