I am having problem in gettting the System Area Guid of Home Area. The
Code
below is working fine on local system but when we install it at the cleint
side it is giving AccessDenied Security Exception.
We have already Impersonated the user with SPS Admin to give the full
rights
but even then we faced the similar problem at the client side.
This is the code we are using which is working fine on local machine
siteUrl="http://servername";
WindowsImpersonationContext wic =
CreateIdentity(constrval[2],constrval[1],constrval[3]).Impersonate();
TopologyManager tm = new TopologyManager();
Uri uri = new Uri(siteUrl);
PortalSite site = tm.PortalSites[uri];
PortalContext portalContext = PortalApplication.GetContext(site);
Guid guidHome = AreaManager.GetSystemAreaGuid(portalContext,
SystemArea.Home);
Area areaHome = AreaManager.GetArea(portalContext, guidHome);
Below you find the Exception
GetAllAreasList Error Access Denied
Stack Trace at Microsoft.SharePoint.Portal.Security.aj.c() at
Microsoft.SharePoint.Portal.SiteData.AreaManager.GetSystemAreaGuid(PortalCon
text ctx, SystemArea type) at
CategoryManager.CategoryManager.GetAllAreasList()
SourceMicrosoft.SharePoint.Portal
Do you know someone who can help? Share a link to this thread on twitter, or facebook.