0

Environment : SharePoint 2013 , FBA implementation, SQL server 2012.

Issue Definition : it is not allowing us to add same user name existing in resembling name of organization as shown below. it shows an exception at 2 places.

Robert.Green robert.green@ABC -> Successful

Robert.Green robert.green@ABC Codes Service -> FAIL – Exception, User does not exist, User not found

Below is code for adding users.

spWeb.SiteUsers.Add("i:0#.f|providername|robert.green@Codes Service", user.Email, user.UserName, string.Empty); - Exception : User does not exist

sharepointUser = spWeb.SiteUsers["i:0#.f|providername|robert.green@Codes Service"];

Exception : User not found

111
  • 1,779
  • 1
  • 12
  • 15
Jay Bhagatwala
  • 31
  • 1
  • 3
  • 12

1 Answers1

0

Domain is invalid for that second user. Spaces aren't valid in that context. Replace spaces with dashes or underscores or something to avoid the issue.

Maarten
  • 451
  • 2
  • 5