SharePoint 2010中关于An error was encountered while retrieving the user profile的处理方式记录...

今天,在我将用户权限提升为system account之后,打算使用SocialTagManager.GetAllUrls(Term term)获取所有标记为指定的term的url。但是在调用的时候就报下面的错误:

An exception has occurred. ExceptionType: 'UserNotFoundException' ExceptionMessage: 'An error was encountered while retrieving the user profile.' StackTrace: ' at Microsoft.Office.Server.UserProfiles.UserProfileCache.GetUserData(UserProfileManager objManager, Nullable`1 recordId, Guid gAcct, String strAcct, Byte[] bSid, String strEmail, Boolean doNotResolveToMasterAccount) at Microsoft.Office.Server.UserProfiles.UserProfileCache.GetUserProfileByAccount(UserProfileManager objManager, String accountName) at Microsoft.Office.Server.UserProfiles.UserProfileManager.GetUserProfileRecordId() at Microsoft.Office.Server.UserProfiles.ProfileLoader.EnsureUserProfileRecordId() at Microsoft.Office.Server.SocialData.SocialDataManager.GetCurr... 90ee5734-6bb5-4ee3-a216-4736239fce66
08/15/2011 16:33:05.65* w3wp.exe (0x18A4) 0x0F8C Patterns and Practices SharePoint Guidance 0000 Information ...entUserProfileRecordId() at Microsoft.Office.Server.SocialData.SocialTagManager.GetAllUrlsTaggedWith(Guid termID, Nullable`1 from, SocialItemPrivacy socialItemPrivacy) at Microsoft.Office.Server.SocialData.SocialTagManager.GetAllUrlsTaggedWith(Guid termID, Nullable`1 from) at Microsoft.Office.Server.SocialData.SocialTagManager.GetAllUrls(Term term) at HP.ITSE.APAD.SharePoint.GCN.WebParts.SocialTaggedUrlListsWebPart.SocialTaggedUrlListsWebPartUserControl.<>c__DisplayClass1.<Render>b__0()' Source: 'Microsoft.Office.Server.UserProfiles' TargetSite: 'Microsoft.Office.Server.UserProfiles.Cache.UserData GetUserData(Microsoft.Office.Server.UserProfiles.UserProfileManager, System.Nullable`1[System.Int64], System.Guid, System.String, Byte[], System.String, Boolean)

错误的大致意思就是找不到user profile。

   发生这个错误的原因是我将权限提升为了system account,所以代码在process 的user profile也使用system account 的user profile,但是在user profile中找不到system account 的user profile. 然后我按以下步骤将问题解决:

    1. 打开Central Administrator-->Security-->General Security,拷贝Configure  service accounts中的用户名.    

    2. 点击Central Administrator-->Application Management ,打开Service Application下的Manage Service Applications.

    3.在step2中打开的页面中点击User Profile Service.然后选择People中的Manage User Profile.

    4.在页面中查询step1拷贝的用户名的user profile, 出现上述就是因为在这里找不到profile .

    5.点击New Profile,为step1拷贝的用户添加一个新的user profile.

    6.错误解决!

转载于:https://www.cnblogs.com/snailJuan/archive/2011/08/16/2140596.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值