Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

We use ADFS and have a problem.

The PeoplePicker find users and show a string such as: "UserDisplayName [Active Directory]".

But the page throws the following error:

Microsoft.SharePoint.SPException: The specified user i:0#.w|kspd\fzimin could not be found.   
 at Microsoft.SharePoint.SPWeb.EnsureUser(String logonName)    
 at Microsoft.SharePoint.Administration.SPSiteAdministration.set_SecondaryContactLoginName(String value)    
 at Microsoft.SharePoint.ApplicationPages.OwnersPage.BtnConfirm_Click(Object sender, EventArgs e)    
 at System.Web.UI.WebControls.Button.OnClick(EventArgs e)    
 at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)    
 at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)    
 at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
share|improve this question
add comment

2 Answers 2

I guess the problem is that the user is removed from active directory and the user profile synchronization doesn't run after that user deleted.

to check that run the user profile sync again then try to find the user in the user picker if you didn't find it so that is the problem.

EnsureUser() method is check the user firstly in AD then check in the site if doesn't exist in the site it add it but it seems as i am expecting , try and let us know.

share|improve this answer
add comment

I would say your user profile service is not working for some reason or another, I would check the logs and look for more details.

Is this a console application? I am not sure where you are using your code remember SPContext doesn't exist here.

Is sql server fully up to date with the latest service pack? This causes errors with user lookups and direct browsing.

Also I googled this up for you as a start point, but your logs are the way to go. http://social.msdn.microsoft.com/Forums/en/sharepointdevelopment/thread/8030d35f-fe49-4dd4-8416-a281ed4c0228

share|improve this answer
1  
"Is this a console application?" - In standart sharepoint admin page. –  user1167761 Aug 16 '12 at 12:48
    
Did you check your logs for the warnings/errors ULS viewer will make this easier if you aren't familiar. –  Hugh Wood Aug 16 '12 at 12:50
    
I copy/paste error from ULS. There is not more intrestion messages with the same correlation id or somewhere near. –  user1167761 Aug 16 '12 at 12:56
    
Have you checked to make sure your sql server is on the latest patch? –  Hugh Wood Aug 16 '12 at 13:21
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.