questions about membetship and role

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
 
J

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.
 
D

Dominick Baier

The CreateUserWizard has an event UserCreated (or similar) - here you can
use the Roles class to add the user to a role

Roles.AddUserToRole(...);
 

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,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top