Forms authentication

T

tma

How do I set the user roles in my login for asp.net? I have set my
authorizations in web.config but cannot seem to find where I set the user
roles in code. The below does not work:


Dim MyIdentity As New GenericIdentity("MyIdentity")

Dim MyStringArray As String() = {"Administrator"}

Dim MyPrincipal As New GenericPrincipal(MyIdentity, MyStringArray)

Thread.CurrentPrincipal = MyPrincipal
 

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

Top