Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6720847
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T09:15:36+00:00 2026-05-26T09:15:36+00:00

Creating my first site that uses the login/membership system provided in ASP.NET (v4). So

  • 0

Creating my first site that uses the login/membership system provided in ASP.NET (v4).

So far all is good, used the web.config to point it at a remote SQL server, and it’s working.

What I didn’t do originally was specify an ‘applicationName’ for the membership provider, so when looking at the table(s) in the SQL server it shows the name as “/”.

I updated the web.config and added the Membership and Provider sections needed to assign a name, assigned one, and ran the ASP.NET Configuration Wizard to re-initialize the user DB.

In the SQL server the application now shows its name and a new GUID, and works as expected.

My question is, is there an automated way to get rid of all the (now unneeded) records associated to the ‘old site’ from the various ASP.NET SQL table(s), or am I stuck doing it manually?

If I need to do this manually, is anyone aware of a laid out set of procedures to ensure all references are removed from the DB?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T09:15:37+00:00Added an answer on May 26, 2026 at 9:15 am

    I have used this script on my development machine with no issues in the past. I can’t say that I have ever really gone to town with the membership provider so I have only ever had data in the users and roles table but I think this script should tidy everything up.

    Make a backup before you run it of course as I haven’t added any transactions around it.

    DECLARE @APPID UNIQUEIDENTIFIER 
    
    --Change the application id to the app you want to clear out 
    SET @APPID = 'bb5f1064-062d-4a21-875c-dc15c1e9ec27'
    
    delete from aspnet_Membership Where UserId in ( Select UserId From aspnet_Users Where ApplicationId = @APPID)
    delete from aspnet_PersonalizationPerUser Where PathId in ( Select PathId From aspnet_Paths Where ApplicationId = @APPID)
    delete from aspnet_PersonalizationAllUsers Where PathId in ( Select PathId From aspnet_Paths Where ApplicationId = @APPID)
    delete from aspnet_Paths Where ApplicationId = @APPID
    delete from aspnet_PersonalizationPerUser Where UserId in ( Select UserId From aspnet_Users Where ApplicationId = @APPID)
    delete from aspnet_Profile Where UserId in ( Select UserId From aspnet_Users Where ApplicationId = @APPID)
    delete from aspnet_UsersInRoles Where RoleId in( Select RoleId from aspnet_Roles Where ApplicationId = @APPID)
    delete from aspnet_Roles Where ApplicationId = @APPID
    delete from aspnet_Users Where ApplicationId = @APPID
    delete from aspnet_Applications Where ApplicationId = @APPID
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am creating my first site in asp.net MVC and I have a very
I am in the process of creating my first site in ASP.NET MVC, it
I am creating an asp.net mvc4 site using entity framework 5 with codefirst and
When you start creating an application or site in ASP.NET MVC, what do you
I have a product admin web site that has been generated using ASP.NET Dynamic
After creating a proof of concept for an ASP.NET MVC site and making sure
I have a site that I am currently working on in ASP.NET 2.0 using
I am creating my first site from scratch using PHP, MySQL, CSS, HTML, and
I am creating a site that requires a very small postcode checker. I have
I am creating my first website that I am taking live soon. It is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.