Netlink2
asked on
Roles.AddUserToRole gives an error " The user 'newUser' is already in role 'Guests' "
When using a standard login control it won't allow me to add a new user, not even "JoeBloggs".
The following is the code:
Roles.AddUserToRole(userna me, "Guests")
The following is the error:
An exception of type 'System.Configuration.Prov ider.Provi derExcepti on' occurred in System.Web.dll but was not handled in user code
Additional information: The user 'JoeBloggs' is already in role 'Guests'.
The following is the code:
Roles.AddUserToRole(userna
The following is the error:
An exception of type 'System.Configuration.Prov
Additional information: The user 'JoeBloggs' is already in role 'Guests'.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I also had to change the web.config file to
<remove name="LocalSqlServer"/>
<add name="LocalSqlServer" connectionString="Data Source=Server;Initial Catalog=RealEstate;Persist
I still don't know exactly where the problem was, but removing the connectionstring caused the error to change.