locked
Unable to create client database for tables aspnet_Paths, aspnet_PersonalizationPerUser, aspnet_Roles, and aspnet_Users RRS feed

  • Question

  • I am working on a client project that wants to incorporate offline sync from their database, which has ASP.Net Membership tables.  When I am attempting to create the Local Data Cache object, I select all the tables, each set to get new or incremental changes.  When I hit Ok to create the sync I get the following error:

    Synchronizing the database failed with the message: 'Unable to initialize the client database, because the schema for table 'aspnet_Paths, aspnet_PersonalizationPerUser, aspnet_Roles, aspnet_Users' could not be retrieved by the GetSchema() method of DbServerSyncProvider.  Make sure that you can establish a connection to the client database and that either the SelectIncrementalInsertsCommand property or the SelectIncrementalUpdatesCommand property of the SyncAdapter is specified correctly.'

    I obviously am able to connect to the client database, and the Insert and Update command options are disabled for all tables when I am adding them to the cache selection.

    Any ideas how to fix this?  Otherwise I'm going to have to create a custom membership and profile provider just to work around this, and that is very undesirable.

    Wednesday, March 7, 2012 9:40 PM

All replies

  • what version of SQL Server are you using?
    Thursday, March 8, 2012 2:07 AM
  • 2008 R2
    Thursday, March 8, 2012 3:13 AM
  • out of curiousity, when you right click on the database in SSMS, click on Properties, do you see ChangeTracking there? try setting it to true yourself.
    Thursday, March 8, 2012 3:56 AM
  • Yes, Change Tracking is turned on.  I am able to build the sync against all the other tables in the database, but when the aspnet_ tables are added I get the above error.  And I am including all the aspnet_ tables, it is just the 4 listed above that it does not like.

    Since I am working against a database provided by a client, I thought they might have tweaked something with those tables that was causing it, so I just created a brand new database, ran then aspnet_reg tool to create the tables, and then tried creating a new sync against that fresh database, and got the same error.

    Thursday, March 8, 2012 1:07 PM
  • interesting...one of my clients was adding aspnet stuff as well this morning and i ran the wizard against it and it ran perfectly although not including the aspnet_paths and the aspnet_personalizationperuser.

    can you try reordering the way you add the tables so that parent tables is in the list first? (e.g., aspnet_users before aspnet_path, etc...)

    Thursday, March 8, 2012 4:01 PM
  • No luck.  I added aspnet_Applications, aspnet_Membership, aspnet_Profile, aspnet_SchemaVersions, and aspnet_WebEvent_Events during the initial cache creation and they synced fine.  I then attempted to add aspnet_Users and it gave me the same "schema for table 'aspnet_Users' could not be retrieved by the GetSchema() method"
    Thursday, March 8, 2012 4:11 PM