views:

66

answers:

1

When setting up a new ASP.NET MVC Web Application, the default connection string inside Web.Config is something like this:

connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true"

I'm just wanting to play around with logging in and registering, etc but when I run the app it obviously can't find a SQL database. What database with what tables do I need to setup to do this?

I have SQL Server 2005 Standard installed on my system, is that enough?

Thanks.

+3  A: 

SQL Server 2005 is more than enough. The default connection string is looking for a SQL Server Express file in the App_Data folder. Replace it with the following:

Data Source=<server name>;Initial Catalog=<database name>;User Id=<user name>;Password=<password>;

If you want to generate the ASP.NET membership tables then run aspnet_regsql.exe, which is found in the .NET 2.0 framework folder (e.g. C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727). A wizard will guide you through the process.

CodeMonkey1