I was just creating an instance of a userprofilemanager and i get an error in the same line
UserProfileManager myuserprofilemanager = new UserProfileManager(mycontext, true, true);
Error is - "UserProfileApplicationNotAvailableException_Logging :: UserProfileApplicationProxy.ApplicationProperties ProfilePropertyCache does not have 0d3993c7-9fe0-46b6-ae17-241e6d502bd3"
Any help is highly appreciated.
The stach trace tells at Microsoft.Office.Server.Administration.UserProfileApplicationProxy.get_ApplicationProperties() at Microsoft.Office.Server.Administration.UserProfileApplicationProxy.CheckAdministrationAccess(UserProfileApplicationAdminRights rights, Boolean requireAllRights) at Microsoft.Office.Server.Administration.UserProfileApplicationProxy.CheckAdministrationAccess(UserProfileApplicationAdminRights rights) at Microsoft.Office.Server.UserProfiles.ProfileManagerBase.CanManagePeople(UserProfileApplicationProxy userProfileApplicationProxy) at Microsoft.Office.Server.Administration.UserProfileApplicationProxy.get_IsProfileAdmin() at Microsoft.Office.Server.UserProfiles.ProfileManagerBase.get_IsProfileAdmin() at Microsoft.Office.Server.UserProfiles.UserProfileManager..ctor(SPServiceContext serviceContext, Boolean IgnoreUserPrivacy, Boolean backwardCompatible) at ConsoleApplication1.Program.b_0() in \aucfsrv.auc.ab.ca\hdrives\u50038\Visual Studio 2012\Projects\ConsoleApplication1\ConsoleApplication1\Program.cs:line 27 at Microsoft.SharePoint.SPSecurity.<>c_DisplayClass5.b__3() at Microsoft.SharePoint.Utilities.SecurityContext.RunAsProcess(CodeToRunElevated secureCode)
i have set full control User Profile Service Application permission for for the user under which application is running