EPiServer’s ContentReference.StartPage is an empty reference when lacking binding

I was setting up a new port for SSL on my local development machine for added security on a client’s EPiServer 7.5 website when I stumbled across an exception that was not all at once obvious. I set up a new https binding in the IIS along with a self signed certificate; my normal unsecure site continued to respond just fine to calls on http://localhost:17002/ after this. However, when I tried accessing it through https://localhost:17004/, which was what I had selected for SSL I got hit with the parameter-does-not-have-a-value exception below.

NOTE: Also see Ted Nybergs comment about scheduled jobs below.

Message: The provided content link does not have a value. Parameter name: contentLink

StackTrace:
at EPiServer.DataFactory.Get[T](ContentReference contentLink, ILanguageSelector languageSelector)
at EPiServer.DataFactory.Get[T](ContentReference contentLink)
at Xxxxx.Web.Helpers.ResultFilters.PageContextActionFilter .OnResultExecuting(ResultExecutingContext filterContext) in c:\Projekt\MyProject\Xxxxx.Web\Helpers \ResultFilters\PageContextActionFilter.cs:line 80
at System.Web.Mvc.ControllerActionInvoker .InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation)
at System.Web.Mvc.ControllerActionInvoker .InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation)
at System.Web.Mvc.ControllerActionInvoker .InvokeActionResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass25.b__22(IAsyncResult asyncResult)
at System.Web.Mvc.Controller.<>c__DisplayClass1d.b__18(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncResultWrapper.<>c__DisplayClass4.b__3(IAsyncResult ar)
at System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncResultWrapper.<>c__DisplayClass4.b__3(IAsyncResult ar)
at System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult)
at System.Web.Mvc.MvcHandler.<>c__DisplayClass8.b__3(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncResultWrapper.<>c__DisplayClass4.b__3(IAsyncResult ar)
at System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web .HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

After some debugging it turned out that it was EPiServer’s ContentReference.StartPage that was not set correctly; it was just empty.

EPiServer ContentReference.StartPage is not set when there is a binding missing.

The solution for this is really rather simple. Turns out that I had forgot to set the corresponding host name binding in EPiServer’s admin mode. Adding an entry containing the proper https port number fixed it right up.

EPiServer website hostnames.

7 Comments

  1. Ted Nyberg June 19, 2014
    • Mathias Kunto February 25, 2015
    • Kenia April 23, 2015
    • Fredrik Stolpe August 20, 2015
  2. Greger Olofsson November 15, 2014
  3. Fredrik Heidgert April 9, 2015
  4. Peter Gustafsson October 6, 2015