0

I've tried to get the start or root node using EPIServer webservice. When programming in EPI I just do

PageReference parent = PageReference.StartPage;

but when using the webservice it gets a little trickier since this doesn't work

PageStoreService.PageReference.?

How do I do to get the start or root node using the web service? Thanks.

Andreas
  • 2,336
  • 2
  • 28
  • 45

2 Answers2

1

Not sure if the PageStoreService can provide that information, but you could quite easily roll your own service to obtain the start page, and any other information you'd need

Something like this might work (it's untested!)

[WebService(Namespace=http://yournamespace/")]
public class PageReferenceService : System.Web.Services.WebService
{ 
    [WebMethod()]
    public PageReference GetStartPage()
    {
        return PageReference.StartPage;
    }  
}
tompipe
  • 949
  • 6
  • 8
  • You could actually look at extending the PageStoreService so you wouldn't have the additional code to call two different services – tompipe Apr 25 '13 at 09:44
0

Maybe try to use that:

var link = ContentReference.StartPage;

It also returns a PageReference to the StartPage

P.S. I always use that and I've never had such problems, like you.