Setting the AccountController in ASP.NET MVC 1.0 Template Not to Connect to SQL Server Express
I'm writing a website in ASP.NET MVC, using the ASP.NET MVC 1.0 template that was added to VS2008 for me by the ASP.NET MVC installer. The template automatically adds an AccountController, but its account methods tie into a SQL Server Express entity. I don't have Express installed here. How can I reconfigure it to use my SQL Server 2008 database and to store user info in some columns in a User table I've already开发者_如何转开发 created?
Change the connection string in web.config. By default it uses the SqlMembershipProvider, so the tables must be created with the aspnet_regsql.exe
utility. If you want to use a custom database schema you might need to write your own provider.
精彩评论