Permenant link as LinkURL after publish

Vote:
 

We have a setup with a backend server for edit/administration tasks and a front end server deliviring pages to the visitor.

Sometimes, not all, when we publish a page on the back end server the re-published page will get the wrong LinkURL. Not the normal 

/Templates/Pages/ProjectPage.aspx?id=16777217__OurPageProvider

but instead it's permenant link

~/link/1d8c53d9ac0b4f6f9ff00312b202d224.aspx

In some cases the page request on the front end server generates the following exception on the published page

System.UriFormatException: Invalid URI: The hostname could not be parsed.
at System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind uriKind)
at EPiServer.UrlBuilder..ctor(UrlBuilder url)
at EPiServer.Web.FriendlyUrlRewriteProvider.ConvertToInternal(UrlBuilder url, Object& internalObject)
at EPiServer.Web.UrlRewriteModule.HttpUrlRewriteToInternal(UrlBuilder url)
at EPiServer.Web.UrlRewriteModuleBase.BeginRequestEventHandler(Object sender, EventArgs e)
at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
 
As you can see by our pageLink we use a pageprovider. 
Does anybody have a clue to why this happands?
Best regards, Jonas 
#53593
Sep 15, 2011 17:46
Vote:
 

Hi

My guess is that the solution lies in your implementation of the method

Uri ResolveLocalPage(Guid pageGuid, out PageReference pageLink);

EPiServer will when it needs to resolve a link from a permanent link format (guid based) to an external format call each registered IPageResolver (all PageProviders are registered as a IPageResolver) what the corresponding Uri is for a given Guid. In case no IPageResolver matches the ReolveLocalPage request the link will be rendered in a guid format.

So in this case it seems that your provider does not return the URI on the request.

Regards 

Johan Björnfot, EPiServer

#53653
Sep 16, 2011 21:40
Vote:
 

Thank you for your reply Johan!

 

Updated: With more debug info we found a fault in our ResolveLocalPage. Thank you once more for pointing us in the right direction Johan!

Regards, 

Jonas

#53677
Edited, Sep 19, 2011 18:28
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* 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.