I am creating dropdown navigation menu for SharePoint. It should be dynamic as any user makes any changes should be reflected automatically.
I developed an C$.NET windows application to access SharePoint Portal information using Microsoft.SharePoint.Portal.SiteData. It is working fine and i am able to get all the information I need.
Then, I developed a WebService which have the same sequence of code as windows application. But I am getting error as follows.
---ERROR MESSAGE---
An unhandled exception of type 'System.Web.Services.Protocols.SoapException' occurred in system.web.services.dll
Additional information: System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> Microsoft.SharePoint.Portal.Security.AccessDeniedException: Access Denied
at Microsoft.SharePoint.Portal.Security.aj.c()
at Microsoft.SharePoint.Portal.SiteData.AreaManager.GetSystemAreaGuid(PortalContext ctx, SystemArea type)
at SharePointPortalWS.SharePointPortalWS.LoadPortalStructure(String SiteName) in c:\inetpub\wwwroot\webservicesforspp\sharepointportalws\sharepointportalws.asmx.cs:line 42
--- End of inner exception stack trace ---
---CODE OF WebService---
TopologyManager topologyManager =
new TopologyManager();PortalSiteCollection sites = topologyManager.PortalSites;
PortalContext portalContext = PortalApplication.GetContext(sites[
new Uri( SiteName)].ID );Guid homeGuid = AreaManager.GetSystemAreaGuid(portalContext, SystemArea.Home); // Here error comes.
Area homeArea = AreaManager.GetArea(portalContext, homeGuid);
AreaCollection areasTopics = homeArea.Areas;
site=
new SharePointPortalSite(sites[new Uri( SiteName)].ID.ToString() ,SiteName );--END OF CODE--
It seems there is some issue with rights required to access SharePoint Portal site through WebService and I am unable to solve this problem.
Thank you,

Could not access SharePoint Area information from WebService
xiaotao
Problem solved.
See "Writing Custom Web Services for SharePoint Products and Technologies" in MSDN.
It gives details with steps to follow.
Suketu