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

  • Thread starter Thread starter Bogdan
  • Start date Start date
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
 
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
 
Back
Top