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

  • Home
  • SEARCH
  • 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 609029
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T17:31:20+00:00 2026-05-13T17:31:20+00:00

I want to use ASP.NET Application Services but configure it to use a different

  • 0

I want to use ASP.NET Application Services but configure it to use a different schema. I’m using the aspnet_regsql.exe tool as outlined in this URL which by default creates tables and stored procs with a dbo schema.

So i thought i could just generate a database script from existing Application Objects and then find and replace [dbo]’s with [example], and then delete the original Application Services objects and execute the edited script to get the outcome I wanted. Would have only taken a jiffy.

But in reading this Scott Gu blog post there are people in the comments section who have tried this very approach and found it fell over. Scott replied by requesting an email about the issue, which I assume is an acknowledgement of the problem, but I dont see any resolution.

So I’m at the data modelling stage and I really dont want a whole lot of hassle down the track. Does anyone know if this has been resolved or if there continue to be any snags in the find and replace approach to the ‘dbo’ schema problem?

UPDATE:

So i didn’t even get “very far down the track” before the above fell over. It’s obviously easy enough to configure the database so that all the objects properly reference each other using the new schema but its appears all the support code has hardwired “dbo” references in it… rather than using the default schema of the connecting user account.

Simply trying to use the VS Studio > Project | ASP.NET CONFIGURATION tool is enough to break it. After altering the web config to point at the new database with the adjusted schemas and then going to the Security Tab of the config tools I get an error “Could not find stored procedure ‘dbo.aspnet_CheckSchemaVersion'”. So it appears ‘dbo’ has been baked in. 🙁

UPDATE 2:

So I’ve added in SYNONYMS as outlined in the accepted answer and it works but I did have to enter 4 records into the database in order to get it rolling. That took a whole 30 seconds. 😉

Before doing this I got the following error:

The
‘System.Web.Security.SqlMembershipProvider’
requires a database schema compatible
with schema version ‘1’

So I had to copy an application row from the aspnet_Applications table. And then 3 rows from the aspnet_SchemaVersions table. I got these from a default dbo schema install.

This was the aspnet_Applications record (masked ‘xxxx’ for uniqueness – you’ll have to make your own key):

/   /  xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx  NULL

These were the aspnet_SchemaVersions records:

common  1   True

membership  1   True

role manager    1   True

It all works now though. I will update this post if I encounter any problems in the future.

  • 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-13T17:31:21+00:00Added an answer on May 13, 2026 at 5:31 pm

    In that case the answer most likely lies with the use of Sql Server SYNONYMS which are like aliases. This article How and why should I use SQL Server 2005 synonyms? has an introduction to them.

    You basically want to:

    CREATE SYNONYM   
         [dbo].[aspnet_CheckSchemaVersion]
    FOR  
         [yourschema].[aspnet_CheckSchemaVersion]
    

    For each affected object. This could be time consuming so this script will likely be of some benefit:

    SELECT 'CREATE SYNONYM [dbo].[' + p.Name + '] FOR [' + s.Name + '].[' + p.Name + ']' FROM sys.Procedures p INNER JOIN 
    sys.Schemas s on p.schema_id = s.schema_id
    

    You need to copy paste the output of the above script into a new script window and execute that. So the idea is that you’re using a script to generate other script commands.

    If you then execute the output of the above script, it will then create synonyms for all procedures in the db.

    So note:

    1. It assumes you have a db with only Application Services procs in it. If you have your own custom procs in there then you will have to add a WHERE conditional to filter for only Application Services objects which start with ‘aspnet_’ i.e.

      WHERE p.name LIKE ‘aspnet_%’.

    2. This procedure assumes you’ve already done a find and replace to setup your new schema. i.e. generated a database script from the original db, done a find and replace on the dbo schema references, then delete/drop original dbo objects, and then run the amended script to get the [schema].[object] setup you want, and then finally use the scripts above.

    3. The performance cost of using SYNONYMs will be application dependant.

    Sounds like a lot of trouble but the whole procedure will probably take you 3-4 mins.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

No related questions found

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.