Manually adding a ASP.Membership account for an install script

  • Thread starter Thread starter DotNetNewbie
  • Start date Start date
D

DotNetNewbie

Hello,

I am having issues with manually creating a membership user using the
stored procedure: aspnet_Membership_CreateUser

I can't seem to be able to insert a 'password salt' value and have it
work when I try and log in.

Here is what I did: After creating a user and being able to
successfully log into my application, I looked in the database for the
Password Salt.

I then used that SAME value along with username in my install.sql
script file (it just preloads the database with data).

My login doesn't work though, what could the problem be?
 
One way to do this is to actually add

System.Web
and all the <membership> xml to a CONSOLE app or Windows Form app.

And then you can code against the membership provider, and get this default
data in.

.......

I do this for an application.
The client gives me a list of users, their default password, and a user to
role mapping.
(I give them the list of roles).

I actually wrote a (company owned) text file parser that does the work for
me.

..................

The TSQL stuff.

I got this to work one time, but I was using plain passwords. So maybe
someone else can help with that.
 
One way to do this is to actually add

System.Web
and all the <membership> xml to a CONSOLE app or Windows Form app.

And then you can code against the membership provider, and get this default
data in.

......

I do this for an application.
The client gives me a list of users, their default password, and a user to
role mapping.
(I give them the list of roles).

I actually wrote a (company owned) text file parser that does the work for
me.

.................

The TSQL stuff.

I got this to work one time, but I was using plain passwords. So maybe
someone else can help with that.

Basically for this application, we have to have the 'admin' user
account preloaded in the database on fresh installs. So I am trying to
create a data.sql script that will load the database, and I want to
setup the admin user account with username: admin and password: change

And I am using non-clear passwords, so I am confused as to why me
putting the same values as what my database has now in the script
doesn't work (login fails when I setup the database).
 

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

Back
Top