Problem Deleting Users From Roles

  • Thread starter Microsoft News Group
  • Start date
M

Microsoft News Group

I am setting up a customer portal. I am setting up users, and then deleting
them. But if I set up a user with the same name I deleted. Then I get this
error.

The user 'Flynn' is already in role 'basic'.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.

Exception Details: System.Configuration.Provider.ProviderException: The user
'Flynn' is already in role 'basic'.


I am assuming when I delete a user it doesnt delete it from the roles
either. Is there anyway I can accomplish this?
 
G

Guest

Microsoft News Group,
In the standard ASP.NET Membership / Rolese / Profile database setup, there
is a table "dbo.aspnet_UsersInRoles" that has a foreign key constraint.
So if a given user is in a role, and you do not remove the user from the
role before deleting the user, the delete of the user should fail.
Peter
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top