вторник, 5 июля 2011 г.

Sharepoint 2010 and UserProfileManager from console app

Добрый день!
Когда вы работаете с консольного приложения и получаете ошибку (Object reference not set to an instance of an object) при таком коде:
UserProfileManager profileManager = new UserProfileManager(contect);

Нужно сделать следующее:
  1. Open the SharePoint 2010 Central Administration page, and then click Manage Service Applications.
  2. Select the row for the User Profile Service application. Instead of clicking the name, select the row to highlight it.
  3. On the Service Applications tab, click Permissions.
  4. In the Connection Permissions for User Profile Service Application dialog box, add the user or group that needs permission to run impersonation applications. After you click Add, and the user name shows in the list of claims, select the added user in the list and then select the Full Control check box. Otherwise, the user is not added when you click OK. Full Control is the only option.
  5. To ensure that the user or group is added, reopen the Connection Permissions for User Profile Service Application dialog box and confirm that the new user or group displays in the list of claims. 
Ссылка на  оригинал статьи:  
 http://ctp.social.technet.microsoft.com/Forums/en-NZ/sharepoint2010programming/thread/09ca1621-1c26-4208-ab62-7bf52df14e23

Комментариев нет:

Отправить комментарий