Hi,
I have read around the issue (Ishai Sagi, Maurice Prather etc). I'm just not sure whether this is actually my problem....
I have a web part that is attempting to display the memberships of any user in the profile database. The display should work for any logged in user.
My code uses SPSecurity.RunWithElevatedPrivileges delegate to get the userprofile object and from thence the membershipmanager object, then GetItems.
When this code runs, not all memberships are retrieved. In fact, in my production environment, the only way to get any items listed is to log in as Sharepoint\system.
I found the override IgnoreUserPrivacy (http://msdn2.microsoft.com/en-us/library/ms570916.aspx) which is sadly undocumented thinking that this would give me the results I want. However, when I add this to my code, the page then fails with a 403. Debugging shows that "you must have manage user profiles administrator rights to use administrator mode". With the RunElevatedPriviliges method, I had assumed that the code executes as the app pool account. I therefore gave the app pool account "manage user profiles" permissions in SSP. However, this made no difference. I cannot seem to find out what account the code is executing as.
So, I can make the web part work but not retrieve any info from the profile database, or, I can invoke what appear to be special rights, but then the wbe part fails (its a 403 as per numerous other postings).
Does this come under Maurice's issue about the HTTPContext security context Does nayone have any insight into the IgnoreUserPrivacy parameter Does anyone have anything like this working (or suggest an alternate method)
TIA
Mark