473,406 Members | 2,312 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Problem Deleting Users From Roles

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?
Aug 3 '06 #1
1 1150
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

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Microsoft News Group" wrote:
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?
Aug 3 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Thomas | last post by:
Hi all! I have an asp.net web application that is configured for dynamic impersonation via web.config (identity impersonate=true). The corresponding virtual directory is protected by integrated...
3
by: Kris van der Mast | last post by:
Hi, I've created a little site for my sports club. In the root folder there are pages that are viewable by every anonymous user but at a certain subfolder my administration pages should be...
2
by: Tim::.. | last post by:
Can someone please tell me why I keep being redirected back to the login page even though I have logged in with the correct cridentials!!! I have used this code before on another site and it...
1
by: sonu | last post by:
Mark is creating a website using ASP.NET. He is using Forms authentication for authenticating and authorizing users. He has the following layout of files and directories in his website: Root...
6
by: Scatir | last post by:
Hi, I have a membership problem I couldn't resolve. I have set up membership as most of tutorial instructed, and I am able to log on, but cannot stay log on for some reason. ex: when I log on, the...
0
by: genzy | last post by:
I'm facing the below problem. With <deny users="?" />, the Windows Login ID is able to be obtained to fill up the Windows IDSID text field automatically, but reading the file info is failed. ...
6
by: Fendi Baba | last post by:
i used the example in the MSDN to getroles and assign users to it on my local development plat form and it worked flawlessly, When I move the same code production, the rolesListbox does not get...
0
by: Chris | last post by:
Hi, i have a problem with sitemap combined with roles. I already posted this but i reformulated simplier: here: there are two defined users: user1 and user2 there is one role: manager user1...
21
by: adjo | last post by:
I am working on an app with an Access2002 frontend and Sql2005 backend. I have to use integrated security. I want to prevent my users from altering data in another way than via the frontend. It...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.