3

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.

1 Answer 1

5

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.