开发者

Schema errors with .NET SqlMembershipProvider

  • V开发者_JAVA百科isual Studio 2010 Ultimate
  • MS SQL Server 2008
  • Default .NET SqlMembershipProvider (aspnet_Users, aspnet_Memmbership, etc...)

I set up a database project to keep the database synced between environments and keep it versioned. The database has a few simple tables I created and then the default installation of the SqlMembership provider that one gets when running the aspnet_regsql.exe tool. I performed a schema comparison from the database to the database project and VS generated all the scripts. Great.

However, I am getting a bunch of errors that break the build regarding some of the objects that the aspnet_regsql tool created.

Schema: [aspnet_WebEvent_FullAccess] has an unresolved reference to object [aspnet_WebEvent_FullAccess].
Schema: [aspnet_Membership_BasicAccess] has an unresolved reference to object [aspnet_Membership_BasicAccess].
Schema: [aspnet_Membership_FullAccess] has an unresolved reference to object [aspnet_Membership_FullAccess].
Schema: [aspnet_Membership_ReportingAccess] has an unresolved reference to object [aspnet_Membership_ReportingAccess].
Schema: [aspnet_Personalization_BasicAccess] has an unresolved reference to object [aspnet_Personalization_BasicAccess].
Schema: [aspnet_Personalization_FullAccess] has an unresolved reference to object [aspnet_Personalization_FullAccess].
Schema: [aspnet_Personalization_ReportingAccess] has an unresolved reference to object [aspnet_Personalization_ReportingAccess].
Schema: [aspnet_Profile_BasicAccess] has an unresolved reference to object [aspnet_Profile_BasicAccess].
Schema: [aspnet_Profile_FullAccess] has an unresolved reference to object [aspnet_Profile_FullAccess].
Schema: [aspnet_Profile_ReportingAccess] has an unresolved reference to object [aspnet_Profile_ReportingAccess].
Schema: [aspnet_Roles_BasicAccess] has an unresolved reference to object [aspnet_Roles_BasicAccess].
Schema: [aspnet_Roles_FullAccess] has an unresolved reference to object [aspnet_Roles_FullAccess].
Schema: [aspnet_Roles_ReportingAccess] has an unresolved reference to object [aspnet_Roles_ReportingAccess].

They all seem pretty circular to me. How do I get rid of these errors? If I cant get rid of them, can I exclude them from my schema comparison all together? How?

Thanks in advance!


I'm guessing the items on the left are Schemas and the ones on the right are the matching Database Roles with matching names, so although it looks circular they are actually different objects.

If you look in your database->Security->Roles and then Schemas do you see both sets?

Do you have both database roles and the schemas in the database project? It could be that you've the schemas synced with the database but not the roles? You'll either need neither or both.

There's an option to IgnorePermissions in the .sqldeployment settings if you don't want to deploy permission changes to the DB. This could be useful if you don't have permissions synced in your db project, but want to drop everything else in the target DB that's not in the model (GenerateDropsIfNotInProject in .sqldeployment)

Hope this helps

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜