Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Script to create an ASP.NET Membership provider User

I created a bunch of insert scripts to add a new user to the aspnet_Membership and aspnet_User table. I can't auth, says it can't find my user.

Has anyone tried to create a new membership user via T-SQL inserts? I have to do it this way because our create user code in C#/ASP.NET does not work at the moment.

like image 204
PositiveGuy Avatar asked Feb 09 '12 21:02

PositiveGuy


1 Answers

From MSDN:

declare @now datetime
set @now= GETDATE()
exec aspnet_Membership_CreateUser 'MyAppName','admin1','pass@word1', '','[email protected]','','',1,@now,@now,0,0,null

http://msdn.microsoft.com/en-us/library/gg252020(v=office.14).aspx

like image 73
Vinicius Avatar answered Sep 22 '22 01:09

Vinicius