Search code examples
asp.netsql-serverscriptingmembership

how to remove dbo role requirement for .net membership in SQL database?


I am transitioning an application from Dev to QA. I have created an sql file to populate the database in the QA environment. In the QA environment I am using windows authentication on the db. My user has minimal permissions. I am comin up with the error

EXECUTE permission denied on object 'aspnet_CheckSchemaVersion', database 'QADB', schema 'dbo'.

when I try an log in. I noticed my db creation script has:

"CREATE ROLE [aspnet_Membership_BasicAccess] AUTHORIZATION [dbo]"

When I change the permissions of my user to dbo, the problem goes away.

I do not wish for my user to be dbo. Does anybody know what I can do to remedy this?


Solution

  • Grant the user the execute permission on the stored procedure, or better still, make sure the user is a member of the role and grant execute permissions to the role.

    GRANT EXECUTE ON aspnet_checkscemaversion TO aspnet_membership_basicaccess