what's the total number of "r"s in:
q: spuser "user cannot be found" i tried to update person column with c#. nt authority\authenticated users in the site have read permission at site site level. sometimes when the code try to find user by login id from web.allusers["login id"] it throws an spexception "user cannot be found". how can i fix this mess?

a: ensure that the user you are trying to add exist in the web site. you can make use of ensureuser() function of the spweb object.
you may write your code as:
spweb spweb = spcontext.current.web;
spuser spuser = spweb.ensureuser(@"domain\username");

on msdn article you can learn more about ensureuser() function.
hope this helps.

a: adding all authenticated users does not mean they are getting to the site. yes, they have permission to site but if you check the user information list of the site, they cannot be found there. 
when you call web.allusers, it checks in the user information list. since the user is not there, it can cause error. there are scenarios where sharepoint put into this list by itself. 


*

*authenticated user logs into site.

*add user through ootb people picker. 


the solution to this is using the web.ensureuser(@"domain\username"). this will first check whether the user is there in the user information list and if not, the user will be added to the list and then return the spuser object.

user
The passage contains seventy "r"s.
assistant