Hi
I have a FBA site. I created a user in Active Directory(AD) and was trying to add this user in the site collection group from my sub site. Almost 70% times it is creating success fully. But 30% time I am getting an error in "
The user does
not exist or is not unique." in the code at the location
string username="testUser"; //User name created in AD
string fbaprovider="i:0#.f|aduser|";
string fbaUser=fbaprovider+username;
oWeb.SiteUsers.Add(fbaUser, email, username, ""); //Error occur in this part
But while I am debugging the code the error doesnot come.This error comes only some times.Most of the tim everything works fine while adding a user to sharepoint group.If this error occurs while debugging the code then I could have got a solution.But it works fine while debugging :( .
I have referred the link
But it didn't help me at all
Please help me in getting a solution.
Regards
Jibin Koshy