Posts Tagged ‘Membership’

The DELETE statement conflicted with the REFERENCE constraint in membership table

January 30, 2013 Leave a comment

To delete a user from the database i used ‘Membership.DeleteUser(user)‘ while doing smoke test it is working in development environment but not in testing environment.

The DELETE statement conflicted with the REFERENCE constraint “FK__aspnet_Us__UserI__47489C52”. The conflict occurred in database “TestDB”, table “dbo.aspnet_UsersInRoles”, column ‘UserId’.

After analysis the ‘aspnet_Users_DeleteUser‘ procedure i came to know all the views for aspnet membership are missing

using ‘SELECT * FROM sysobjects where type = ‘V’

Refrence: Roles and Views in the Application Services Database for SQL Server


Using aspnet_regsql via the command line to setup membership roles

December 21, 2012 Leave a comment

Open the command promt with admin rights and change the directory to


You can run the Aspnet_regsql.exe tool as a command-line utility

Aspnet_regsql.exe –S servername –d databasename –U username –P password –A <optionsto be install>

After install


To Uninstall

Remove Memebrship and roles

Referance :

%d bloggers like this: