Problem with roles

M

Michael Persaud

Hi All,

I am trying to get role based authentication and its not working

I have set IIS to windows and removed anonymous

the config file has identity impersonate=true
winows authen

my codes are:

Dim ident As WindowsIdentity

ident = WindowsIdentity.GetCurrent()

Dim winprin As WindowsPrincipal = New WindowsPrincipal(ident)

Dim role

If winprin.IsInRole("domain\administrators") = True Then

<code>

Exit Sub

End If

or



'Put user code to initialize the page here

If (User.IsInRole(s + "\administrators") = True) Then

'If (User.IsInRole(s + "\managers") = True) Or (User.IsInRole(s +
"\c_users") = True) Then

Else

Response.Redirect("NotMember.aspx")

End If



none isnt working please help



Michael
 

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

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,142
Latest member
arinsharma
Top