questions about membetship and role

  • Thread starter Thread starter Jo
  • Start date Start date
J

Jo

Hi,

I know how to create membership user and to define role via "Administer
website" in design mode of e.g. an ASP.NET login control.

My questions are:
1) how to create a membership user directly in web.config?
2) how to define a role directly in web.config?
3) how to assign a existing membership user to an existing role in
web.config?
4) how to assign a new created membeship (with createuserwizard control) to
an existing role programmatically (i mean: at the moment the new account is
created in the aspx page)?


Thanks
Jo
 
I just read some stuffs about this, so:
1) not possibel, must be inputted in a table
2) same answer
3) not possible; must be done via Administrate website

But for 4) i couldn't find an answer, so if you know it ... thanks in
advance.
 
The CreateUserWizard has an event UserCreated (or similar) - here you can
use the Roles class to add the user to a role

Roles.AddUserToRole(...);
 
Back
Top