views:

204

answers:

1

Hi,

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

+3  A: 

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.

Jose Basilio
Not worthy of its own answer but, as José says, you can use aspnet_regsql.exe from the command line. If you don't supply any switched (eg just aspnet_regsql.exe) then it will open a wizard which will guide you through the process of setting up the features.
Dan Atkinson