Manually add ASP.NET Application Services in db when aspnet_regsql.exe fails

My website host offers me one single free MS Sql database. This leads me to share application specific parts together with Application Services, Membership and Roles in the same database. This can be done automagically with the tool aspnet_regsql.exe, but in my case it failed.

The solution is to manually run the Sql scripts aspnet_regsql.exe use. You can find the scripts InstallCommon.sql, InstallMembership.sql and InstallRole.sql here: C:\Windows\Microsoft.NET\Framework\v4.0.30319.

  1. Edit all three scripts at the lines SET dbname = N’YourDbName’ and  USE [YourDbName] by changing [YourDbName] to the name of your actual database
  2. Run the two scripts
  3. Finally set up the web.config correctly by following the membership Element (ASP.NET Settings Schema)

Trackback URL: https://codeblog.silfversparre.com/2011/11/how-to-add-asp-net-application-services-in-db-when-aspnet_regsql-exe-fails/trackback/