Jalpesh Vadgama
Jalpesh Vadgama

Reputation: 14256

How to enable membership provider for sql server express database

I am playing with ASP.NET MVC with visual webdeveloper express edtion 2008 and sql server express edition. I am creating a site that will use membership provider for that i want to use my own databse not the application services database. I have created my database in app_data folder but still I am not able to register it using aspnet_regsql command. It is not showing that in list.Can any one suggest the way for enabling my database for membership provider

Upvotes: 1

Views: 1079

Answers (1)

Jose Basilio
Jose Basilio

Reputation: 51498

You should be able to run the aspnet_regsql from the command line, like this:

aspnet_regsql -A all -C "Data Source=.\SQLEXPRESS;Integrated Security=True;User Instance=True" -d "C:\MyProject\APP_DATA\aspnetdb.mdf"

Replace the -d switch with the correct path to your APP_DATA folder.

Upvotes: 4

Related Questions