0

As I'm learning the ins and outs of ASP.NET user management, I've learned that the default in VS is for it to use a SQL Server Express .mdf file for the data it needs to save. This won't help me for when I deploy my site, as I'm running SQL Server 2008 R2 on my IIS 7.5 server. I know that I can run a command line tool to automatically create the db tables necessary for user management, and will do that on my development machine, but how do I tell my existing, in development code in VS to ignore the existing Express .mdf file and look at the newly created db tables?

Major Productions
  • 5,914
  • 13
  • 70
  • 149

1 Answers1

1

Simply update your Web.Config to set up the role provider and the database connection string:

http://weblogs.asp.net/scottgu/archive/2006/11/20/common-gotcha-don-t-forget-to-clear-when-adding-providers.aspx

http://www.codersbarn.com/post/2008/02/24/ASPNET-20-Guest-Book-Admin-Part-II.aspx

Also, Scott Mitchell's Membership and Roles tutorial series is the most comprehensive I've seen:

http://weblogs.asp.net/scottgu/archive/2006/05/07/ASP.NET-2.0-Membership-and-Roles-Tutorial-Series.aspx

IrishChieftain
  • 15,108
  • 7
  • 50
  • 91