Try our conversational search powered by Generative AI!

Add page using PageStoreservice

Vote:
 

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);

 

Error:

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 ---

 

 

 

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

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

DataFactory works OK but fails using the webservice.

#19519
Edited, Apr 15, 2008 10:27
Vote:
 

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.

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

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).

#23364
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.