Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Security > Windows autentication with WindowsPrinicipal

Reply
Thread Tools

Windows autentication with WindowsPrinicipal

 
 
naijacoder naijacoder
Guest
Posts: n/a
 
      08-30-2004
Hello,
I'm using Windows Authenetication with my code below with
Windows Principal.
I noticed that when i use IsinRole with "BUILT\Administrator its does
work fine but when i use
DomainName\GroupName it doesn't go.
Does anybody know what 'm doing wrong?
Pls forward ur ideas!
Thanks

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
'Dim UserName As String = wp.Name
Dim wp As New WindowsPrincipal(WindowsIdentity.GetCurrent())
'If wp.IsInRole("DomainName\GroupName") Then
If wp.IsInRole("BUILTIN\Administrators") Then
'code
Response.Redirect("welcome.aspx")

End If
If wp.IsInRole("BUILTIN\dministrators") Then
'code
Response.Redirect("Nowelcome.aspx")

End If

End Sub

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
Reply With Quote
 
 
 
 
Paul Glavich [MVP - ASP.NET]
Guest
Posts: n/a
 
      09-02-2004
Are you using impersonation in your web.config?

--
- Paul Glavich
Microsoft MVP - ASP.NET


"naijacoder naijacoder" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hello,
> I'm using Windows Authenetication with my code below with
> Windows Principal.
> I noticed that when i use IsinRole with "BUILT\Administrator its does
> work fine but when i use
> DomainName\GroupName it doesn't go.
> Does anybody know what 'm doing wrong?
> Pls forward ur ideas!
> Thanks
>
> Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
> System.EventArgs) Handles MyBase.Load
> 'Put user code to initialize the page here
> 'Dim UserName As String = wp.Name
> Dim wp As New WindowsPrincipal(WindowsIdentity.GetCurrent())
> 'If wp.IsInRole("DomainName\GroupName") Then
> If wp.IsInRole("BUILTIN\Administrators") Then
> 'code
> Response.Redirect("welcome.aspx")
>
> End If
> If wp.IsInRole("BUILTIN\dministrators") Then
> 'code
> Response.Redirect("Nowelcome.aspx")
>
> End If
>
> End Sub
>
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!



 
Reply With Quote
 
 
 
 
naijacoder naijacoder
Guest
Posts: n/a
 
      09-02-2004
Hi Paul,
Yeah i wasn't doing impersonation.
Did that and its working fine!
Thx


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
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
How to get IP-Adess of the client (Windows autentication) lvpaul@gmx.net ASP .Net 7 08-10-2005 12:18 PM
Autentication dialog Jeff Dillon ASP .Net 14 11-20-2004 05:32 AM
Windows autentication PROBLEMS naija naija ASP .Net Security 0 08-31-2004 07:41 AM
Forms autentication and registration page - some advices NWx ASP .Net Security 1 02-13-2004 06:23 AM
Forms autentication and registration page - some advices NWx ASP .Net 1 02-13-2004 06:23 AM



Advertisments