SaaS CMS has officially launched! Learn more now.

Add page using PageStoreservice


I am getting the following error when I try to create a new page using Webservice. Does any one know what the problem might be. Thanks for the help.

the below code sample is failing at the last line:

service.RawPage rawPage = pService.GetDefaultPageData(pLink, pageTypeID, selector, service.AccessLevel.NoAccess);

SetPropertyValue(rawPage, "Headline", "Headline, created using service," + currentTime.ToLongTimeString());

SetPropertyValue(rawPage, "PageName", String.Format("Sample page [{0}]", currentTime.ToLongTimeString()));

pService.Save(rawPage, service.SaveAction.Save, service.AccessLevel.NoAccess);



System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.InvalidCastException: Unable to cast object of type 'EPiServer.Core.PropertyString' to type 'EPiServer.SpecializedProperties.PropertyUrl'.
  at EPiServer.DataAccess.PageSaveDB.SetupPageLinkUrl()
  at EPiServer.DataAccess.PageSaveDB.SavePageVersionData(String currentUser)
  at EPiServer.DataAccess.PageSaveDB.CreateAndSave(SaveAction action, String currentUser)
  at EPiServer.DataAccess.PageSaveDB.Save(PageData page, SaveAction action, String currentUser)
  at EPiServer.LocalPageStore.Save(PageData page, SaveAction action, AccessLevel access)
  at EPiServer.DataFactory.Save(PageData page, SaveAction action, AccessLevel access)
  at EPiServer.WebServices.PageStoreService.Save(RawPage page, SaveAction action, AccessLevel access)
  --- End of inner exception stack trace ---




Apr 14, 2008 17:57
Which version of EPiServer are you using ?
Apr 14, 2008 18:23

I am using EPiServer CMS 5 (5.1.422.122). Adding a new page dynamically using

DataFactory works OK but fails using the webservice.

Edited, Apr 15, 2008 10:27

I get the same error when using PageStoreService and the same EPiServer version.

 What I don't understand is why it is failing in "EPiServer.DataAccess.PageSaveDB.SetupPageLinkUrl()". Isn't it automatically generating a new dynamic link for the new page?

 I have no idea how to proceed from here, any thoughts are welcome.

Jun 17, 2008 14:57
Anyone getting a solution to this problem?
Aug 25, 2008 20:39

This issue has been reported in our tracking system as:

#13618: Unable to Cast object Type of PropertyString to Property Url

We hope to have a fix for this included in our next release (R2).

Sep 03, 2008 17:05
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.