Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > How to create Membership user from Installer (custom action)?

Reply
Thread Tools

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

 
 
Bogdan
Guest
Posts: n/a
 
      01-27-2010
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




 
Reply With Quote
 
 
 
 
James VanDyne
Guest
Posts: n/a
 
      01-28-2010
You can write a custom installer to execute the sql necessary to add your
user. Add this is as a custom build action to your setup project. If you
need install time support for user inputs for this user, you can easily
create a quick WinForm to accept those inputs.

http://msdn.microsoft.com/en-us/libr...2d(VS.80).aspx


--
James VanDyne, MCPD
Technical Consultant

"Bogdan" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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
>
>
>
>

 
Reply With Quote
 
 
 
 
Bogdan
Guest
Posts: n/a
 
      01-28-2010
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




"James VanDyne" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> You can write a custom installer to execute the sql necessary to add your
> user. Add this is as a custom build action to your setup project. If you
> need install time support for user inputs for this user, you can easily
> create a quick WinForm to accept those inputs.
>
> http://msdn.microsoft.com/en-us/libr...2d(VS.80).aspx
>
>
> --
> James VanDyne, MCPD
> Technical Consultant
>
> "Bogdan" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> 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
>>
>>
>>
>>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
pywin32 vista installer fix & general distutils installer name bug Ville Vainio Python 0 04-09-2008 07:16 PM
Membership - create user wizard, are there others? Lukas Kurka ASP .Net 2 10-09-2006 03:23 PM
membership/roles create user problem John ASP .Net 3 08-30-2006 12:00 AM
can distutils windows installer invoke another distutils windows installer timw.google Python 1 05-11-2006 10:07 PM



Advertisments