Unable to delete ASP.NET role
I have a set of four ASP.NET roles that I have been trying to delete - they never want to die.
Simply put, I've deleted them successfully by using the website administrator tool and by running the stored procedure:
exec aspnet_Roles_deleteRole '/', 'CameraOwner', 1;
My application name is '/'. I see the records getting deleted from the database. No one is using it. I refresh my role management page - it is gone. However, the next time my application restarts - and sometimes after a page refresh, the deleted roles get re-inserted.
Added: If I delete the roles and do an iisreset: the roles are still deleted. As soon as I hit my application (even with a wget that doesn't have any pre-existing cookies) the roles get re-i开发者_JAVA技巧nserted.
Has anyone experienced this before?
UPDATE: Found my problem. Yet Another Forum.NET had linked Roles. Everytime you reloaded the application, it recreated the missing linked roles.
How did the roles get into your system in the first place? Do you have any code that automatically adds roles? Can you try changing the DB name to make sure another system isn't hitting the same database?
精彩评论