开发者

Setting the AccountController in ASP.NET MVC 1.0 Template Not to Connect to SQL Server Express

开发者 https://www.devze.com 2022-12-27 18:22 出处:网络
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 ac

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号