Kentico 12 MVC - Invalid URI: The format of the URI could not be determined.

   —   

You may see this error after installing your new Kentico 12 MVC site – for example when using the sample Dancing Goat MVC site.

The error is displayed when viewing the Page tab in the Kentico admin interface for a page which uses the Page builder widgets (e.g. Home page in the Dancing Goat MVC site). While the front end MVC application works fine.

Full error message:

Invalid URI: The format of the URI could not be determined. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.UriFormatException: Invalid URI: The format of the URI could not be determined. Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. Stack Trace: [UriFormatException: Invalid URI: The format of the URI could not be determined.] System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind uriKind) +8502638 CMSModules_Content_CMSDesk_MVC_Edit.RegisterMessagingScript(String url) +75 CMSModules_Content_CMSDesk_MVC_Edit.OnPreRender(EventArgs e) +80 System.Web.UI.Control.PreRenderRecursiveInternal() +162 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +6875

This issue is caused by invalid Presentation URL set for your Site. This could have happened when installing Kentico MVC and you have deselected the Register to IIS option (for more details, please see the Installing Kentico MVC Projects documentation, step no.10).

The Presentation URL must include the URL scheme (protocol). If the site is hosted in a virtual directory, include it as well. For example:

https://www.SiteDomain.com or http://localhost/MvcApplication

For more details please see Setting the domain name for content-only sites

Share this article on   LinkedIn

Juraj Ondrus

Hi, I am the Technical support leader at Kentico. I'm here to help you use Kentico and get as much as possible out of it.