Sharepoint Forum

 
Home » Forum » Sharepoint       Ask a questionRSS Feeds

Home Area Guid -Access Denied Error

  Asked By: Samir Kinney         Date: Sep 29, 2009      Category: Sharepoint      Views: 178
 

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.

Tagged:            

 

No Answers Found. Be the First, To Post Answer.

 
Didn't find what you were looking for? Find more on Home Area Guid -Access Denied Error Or get search suggestion and latest updates.


Your Answer
  • Answer should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].