Tuesday, March 15, 2011

How to enable membership provider for sql server express database.

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

From stackoverflow
  • 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.

    Dan Atkinson : 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.

0 comments:

Post a Comment