How to create Membership user from Installer (custom action)?

B

Bogdan

Hi,

I'd like to create an initial Membership user from a custom action (written
in C#). Is this possible?
Creating a role is quite easy but I can't figure out how to automate
creation of a new user from a non-asp app.

Currently I have the installer create roles and install web.config with
security disabled. I then manually create an initial user (using the just
installed app) and enable security in web.config.

Is there a way to automate the above?

Thanks,
Bogdan
 
B

Bogdan

James,

Thanks for the reply.

I probably should've been more specific in my original post.

I have no problem executing a query from a custom action. Actually, this is
exactly what I do to create roles - in addition to create a database and its
objects (tables, stored procs, etc.). While creating a role seems to be
quite simple (execute aspnet_CreateRole with application name and role
name), creating a user is rather complicated (impossible?) if Membership
classes are not used. I do not know if Membership can be used in a
non-asp.net app (e.g. installer custom action).

Any thoughts?

Thanks,
Bogdan
 

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

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top