Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • lance lyons 6 posts 26 karma points
    Feb 13, 2015 @ 19:46
    lance lyons
    0

    Error after upgrade to 7.2.1 Unable to cast object of type 'System.Xml.XPath.XNodeNavigator' to type 'System.Xml.IHasXmlNode'.

    Hi We are getting the following error after the upgrade from 7.1.1 to 7.2.1.   Everything appeared to upgrade ok after doing the required copies and merges.

     

     

    Server Error in '/' Application.

    Unable to cast object of type 'System.Xml.XPath.XNodeNavigator' to type 'System.Xml.IHasXmlNode'.

    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.InvalidCastException: Unable to cast object of type 'System.Xml.XPath.XNodeNavigator' to type 'System.Xml.IHasXmlNode'.

    Source Error:

    Line 20:   if(featured.HasValue("featureImage")) {
    Line 21:        var media = umbraco.library.GetMedia(featured.featureImage, true);
    Line 22:      XmlNode _xmlNode = ((IHasXmlNode)media.Current).GetNode().FirstChild;
    Line 23:         photo = _xmlNode.FirstChild.InnerText;
    Line 24:    }


    Source File: e:\OnlifeMarketing\Views\Partials\FeaturedFirst.cshtml    Line: 22

    Stack Trace:

    [InvalidCastException: Unable to cast object of type 'System.Xml.XPath.XNodeNavigator' to type 'System.Xml.IHasXmlNode'.]
       CallSite.Target(Closure , CallSite , Object ) +128
       ASP._Page_Views_Partials_FeaturedFirst_cshtml.Execute() in e:\OnlifeMarketing\Views\Partials\FeaturedFirst.cshtml:22
       System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +197
       System.Web.Mvc.WebViewPage.ExecutePageHierarchy() +103
       System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +88
       System.Web.Mvc.RazorView.RenderView(ViewContext viewContext, TextWriter writer, Object instance) +256
       System.Web.Mvc.BuildManagerCompiledView.Render(ViewContext viewContext, TextWriter writer) +107
       Umbraco.Core.Profiling.ProfilingView.Render(ViewContext viewContext, TextWriter writer) +93
       System.Web.Mvc.HtmlHelper.RenderPartialInternal(String partialViewName, ViewDataDictionary viewData, Object model, TextWriter writer, ViewEngineCollection viewEngineCollection) +277
       System.Web.Mvc.Html.PartialExtensions.Partial(HtmlHelper htmlHelper, String partialViewName, Object model, ViewDataDictionary viewData) +91
       System.Web.Mvc.Html.PartialExtensions.Partial(HtmlHelper htmlHelper, String partialViewName) +31
       ASP._Page_Views_umbHomePage_cshtml.Execute() in e:\OnlifeMarketing\Views\umbHomePage.cshtml:88
       System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +197
       System.Web.Mvc.WebViewPage.ExecutePageHierarchy() +103
       System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +76
       System.Web.Mvc.RazorView.RenderView(ViewContext viewContext, TextWriter writer, Object instance) +256
       System.Web.Mvc.BuildManagerCompiledView.Render(ViewContext viewContext, TextWriter writer) +107
       Umbraco.Core.Profiling.ProfilingView.Render(ViewContext viewContext, TextWriter writer) +93
       System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context) +291
       System.Web.Mvc.ControllerActionInvoker.InvokeActionResult(ControllerContext controllerContext, ActionResult actionResult) +13
       System.Web.Mvc.<>c__DisplayClass1a.<InvokeActionResultWithFilters>b__17() +23
       System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +245
       System.Web.Mvc.<>c__DisplayClass1c.<InvokeActionResultWithFilters>b__19() +22
       System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +245
       System.Web.Mvc.<>c__DisplayClass1c.<InvokeActionResultWithFilters>b__19() +22
       System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult) +176
       System.Web.Mvc.Async.<>c__DisplayClass2a.<BeginInvokeAction>b__20() +75
       System.Web.Mvc.Async.<>c__DisplayClass25.<BeginInvokeAction>b__22(IAsyncResult asyncResult) +99
       System.Web.Mvc.Async.WrappedAsyncResult`1.End() +50
       System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult) +27
       System.Web.Mvc.<>c__DisplayClass1d.<BeginExecuteCore>b__18(IAsyncResult asyncResult) +14
       System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +23
       System.Web.Mvc.Async.WrappedAsyncResult`1.End() +55
       System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +39
       System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +23
       System.Web.Mvc.Async.WrappedAsyncResult`1.End() +55
       System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult) +29
       System.Web.Mvc.Controller.System.Web.Mvc.Async.IAsyncController.EndExecute(IAsyncResult asyncResult) +10
       System.Web.Mvc.<>c__DisplayClass8.<BeginProcessRequest>b__3(IAsyncResult asyncResult) +25
       System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +23
       System.Web.Mvc.Async.WrappedAsyncResult`1.End() +55
       System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +31
       System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result) +9
       System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +9657896
       System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +155
    



    Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.34237

  • lance lyons 6 posts 26 karma points
    Feb 13, 2015 @ 19:48
    lance lyons
    0

    I forgot to ask if anybody has seen this and recommend the fix.   We did copy over the grid folder per the instructions

     

    Only for versions lower than 7.2.0:

    • /Views/Partials/Grid (contains Grid rendering views)
  • Dan Boersma 1 post 21 karma points
    Mar 12, 2015 @ 22:01
    Dan Boersma
    0

    I am seeing this same error when I attempt to upgrade my 7.0.4 Instance to 7.1.9, 7.2.0 or 7.2.2

    Incidently, I do not see this error when I attempt to upgrade my 7.0.4 instance to 7.1.5 or 7.1.8

    So, I suspect something in Umbraco broke my application in/beyond 7.1.9

    Any resolution/ideas would be greatly appreciated.

    Thanks

    My specific error is:

Please Sign in or register to post replies

Write your reply to:

Draft