Adding Roles 'manually'

Please can someone help.

I have an application that uses a DB table to controll access rights. This table assignes roles to each user.

I have handles the Login Control's Authenticate event to authenticate against this table, which works fine.

I also extract the user's role from the DB, which I would like to also attach so that I can make use of User.IsInRole later in my website.

I have not managed to do this - please can anyone help

(I have tried lots of combinations of: HttpContext.Current.User = New System.Security.Principal.GenericPrincipal(id, MyRoles) and Thread.CurrentPrincipal = New GenericPrincipal(MyIdentity, MyStringArray) but am a bit lost.)




Answer this question

Adding Roles 'manually'

  • Adding Roles 'manually'