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

No members online now.

Forum statistics

Threads
473,989
Messages
2,570,207
Members
46,782
Latest member
ThomasGex

Latest Threads

Top