Visualizzazione dei risultati da 1 a 7 su 7
  1. #1
    Utente di HTML.it
    Registrato dal
    Nov 2000
    Messaggi
    40

    Forms Authentication e schema di SQL Server 2005

    Ciao a tutti.
    Nella mia applicazione uso la form authentication integrata di Asp.net, ho fatto girare regsql sul mio database per avere le tabelle integrate per alcune mie operazioni.
    Il tutto funziona a meraviglia. Compro uno spazio web su Aruba con servizio SQL Server 2005 e loro mi assegnano uno schema di default che ovviamente non è dbo. Ho dovuto quindi cambiare tutti gli schemi alle tabelle / viste / stored procedure ma ho un problema con l'autenticazione. In pratica, quando effettuo il login mi dà il seguente errore: non riesco a trovare la stores dbo.aspnet_checkschemaversion.

    Ora, visto che questa stored viene chiamata direttamente dalle classi Membership, User e compagnia bella che sono fornite dal framework, come faccio a dire a queste classi di usare l'altro schema invece di dbo?

    Devo rifare l'installazione con regsql e usare qualche parametro particolare oppure esiste qualche settaggio nel web.config nella sezione provider?

    Grazie per l'aiuto, ho speso dei soldi ma il servizio di assistenza (dopo un mese di discussioni) non sa nemmeno cos'è l'autenticazione integrata e ovviamente non sa aiutarmi!

  2. #2

  3. #3
    Utente di HTML.it
    Registrato dal
    Nov 2000
    Messaggi
    40
    Grazie mille!

  4. #4
    Utente di HTML.it
    Registrato dal
    Nov 2000
    Messaggi
    40
    Purtroppo non credo sia un problema di provider, io ho installato le tabelle non nel db separato ma all'interno del mio database tramite regssql ma in fase di autenticazione continua a darmi quell'errore. Aruba assegna uno schema predeterminato e non permette di usare dbo. Quella chiamata fa parte immagino di un metodo di una delle classi Membership o User o qualcosa del genere, cioè sono compilate nel framework. Come si può dire a queste classi di usare un altro schema?

  5. #5
    Utente di HTML.it
    Registrato dal
    Nov 2000
    Messaggi
    40
    Trovata la soluzione, anche se la devo ancora provare:

    http://peppepa.wordpress.com/2007/03/05/

  6. #6
    guest.1
    Guest
    io , non so. ma io ho fatto cosi come dice questo blog:
    http://weblogs.asp.net/farazshahkhan/

    riporto quello che ha scritto ma in inglese,
    anche io avevo quel problema.

    Se cerchi nel forum Pubblicazione ASPNETdb, c'è tutto come fare.

    ciao.

    ecco il testo:

    Schema compatiblity error in configuring SqlMembershipProvider

    I was working with one of my projects in which I had to use Membership/Role providers. I run the wizard using aspnet_regsql.exe to create the structure of SqlMembershipProvider. I added few roles and users using ASP.Net Configuration. Everything worked fine tested my application multiple times and it worked very well. Then I generated the script from my local database for SqlMembershipProvider since we can not run the utility aspnet_regsql.exe on our test server. Everything went well so far. All the tables, views, stored procedures, roles were created and permissions were granted. Then when I try to run my application from the test server it gave me following error.

    "The 'System.Web.Security.SqlMembershipProvider' requires a database schema compatible with schema version '1'. However, the current database schema is not compatible with this version. You may need to either install a compatible schema with aspnet_regsql.exe (available in the framework installation directory), or upgrade the provider to a newer version."

    This was a bit confusing error for me since I had worked with SqlMembershipProvider in the past. Then I start recalling the difference between my previous and current deployment and the difference was in ealier deployments either I used aspnet_regsql.exe or copied the structure with data but this time I created the script and generate the structure.

    Still no sign for me to detect the cause of error. Then I started checking the tables and I found that when we run aspnet_regsql.exe it not only creates the structure but insert some values as well in "aspnet_SchemaVersions" table which were missing in my test server. So created manual insert script to add following values.

    -- --Table: [dbo].[aspnet_SchemaVersions]
    -- --Insert
    INSERT INTO [dbo].[aspnet_SchemaVersions] ([Feature], [CompatibleSchemaVersion], [IsCurrentVersion]) VALUES(N'common', N'1', 1)
    INSERT INTO [dbo].[aspnet_SchemaVersions] ([Feature], [CompatibleSchemaVersion], [IsCurrentVersion]) VALUES(N'health monitoring', N'1', 1)
    INSERT INTO [dbo].[aspnet_SchemaVersions] ([Feature], [CompatibleSchemaVersion], [IsCurrentVersion]) VALUES(N'membership', N'1', 1)
    INSERT INTO [dbo].[aspnet_SchemaVersions] ([Feature], [CompatibleSchemaVersion], [IsCurrentVersion]) VALUES(N'personalization', N'1', 1)
    INSERT INTO [dbo].[aspnet_SchemaVersions] ([Feature], [CompatibleSchemaVersion], [IsCurrentVersion]) VALUES(N'profile', N'1', 1)
    INSERT INTO [dbo].[aspnet_SchemaVersions] ([Feature], [CompatibleSchemaVersion], [IsCurrentVersion]) VALUES(N'role manager', N'1', 1)


    BINGO!!! After inserting these values my test server started working as good as my local machine .

  7. #7
    guest.1
    Guest
    Originariamente inviato da Mavel
    Trovata la soluzione, anche se la devo ancora provare:

    http://peppepa.wordpress.com/2007/03/05/

    http://forum.html.it/forum/showthrea...readid=1332380

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2026 vBulletin Solutions, Inc. All rights reserved.