ASP.Net Membership.DeleteUser

前端 未结 7 2038
感情败类
感情败类 2021-02-06 03:19

In testing, the user on a db i\'ve used was a big jefe. In production, he only has Execute.

When I called,

Membership.DeleteUser(user)

7条回答
  •  醉梦人生
    2021-02-06 03:46

    Maybe better to make sure the user that executes the delete membership has the to correct ASP.NET Membership sql roles. In my case I was deleting a membershipuser that has some roles and profile properties. The delete method failed, but after assigning the correct sql roles it worked.

    ALTER ROLE [aspnet_Profile_FullAccess] ADD MEMBER []
    ALTER ROLE [aspnet_Roles_FullAccess] ADD MEMBER []
    

    You could also add [aspnet_Personalization_FullAccess] if you are using that functionality.

提交回复
热议问题