Copied to clipboard

Flag this post as spam?

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


  • Neil Hodges 338 posts 987 karma points
    Mar 08, 2020 @ 12:27
    Neil Hodges
    0

    Dialogue - HTML Agility Pack Error

    When trying to navigate around the site using Dialogue I'm getting this error.

    Method not found: 
    
    'System.Collections.Generic.IEnumerable`1<HtmlAgilityPack.HtmlNode> HtmlAgilityPack.HtmlNode.Descendants()'.
    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.MissingMethodException: Method not found: 'System.Collections.Generic.IEnumerable`1<HtmlAgilityPack.HtmlNode> HtmlAgilityPack.HtmlNode.Descendants()'.
    
    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:
    
    [MissingMethodException: Method not found: 'System.Collections.Generic.IEnumerable`1<HtmlAgilityPack.HtmlNode> HtmlAgilityPack.HtmlNode.Descendants()'.]
       Dialogue.Logic.Application.AppHelpers.RemoveUnwantedTags(String html) +0
       Dialogue.Logic.Application.AppHelpers.GetSafeHtml(String html) +59
       Dialogue.Logic.Services.TopicService.GetTopicBySlug(String slug) +128
       Dialogue.Logic.Controllers.DialogueTopicController.Show(RenderModel model, String topicname, Nullable`1 p) +514
       lambda_method(Closure , ControllerBase , Object[] ) +248
       System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters) +229
       System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters) +35
       System.Web.Mvc.Async.AsyncControllerActionInvoker.<BeginInvokeSynchronousActionMethod>b__39(IAsyncResult asyncResult, ActionInvocation innerInvokeState) +39
       System.Web.Mvc.Async.WrappedAsyncResult`2.CallEndDelegate(IAsyncResult asyncResult) +70
       System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult asyncResult) +42
       System.Web.Mvc.Async.AsyncInvocationWithFilters.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3d() +72
       System.Web.Mvc.Async.<>c__DisplayClass46.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3f() +387
       System.Web.Mvc.Async.<>c__DisplayClass46.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3f() +387
       System.Web.Mvc.Async.<>c__DisplayClass46.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3f() +387
       System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethodWithFilters(IAsyncResult asyncResult) +42
       System.Web.Mvc.Async.<>c__DisplayClass2b.<BeginInvokeAction>b__1c() +38
       System.Web.Mvc.Async.<>c__DisplayClass21.<BeginInvokeAction>b__1e(IAsyncResult asyncResult) +188
       System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult) +38
       System.Web.Mvc.Controller.<BeginExecuteCore>b__1d(IAsyncResult asyncResult, ExecuteCoreState innerState) +29
       System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +68
       System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +52
       System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +39
       System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult) +38
       System.Web.Mvc.MvcHandler.<BeginProcessRequest>b__5(IAsyncResult asyncResult, ProcessRequestState innerState) +43
       System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +68
       System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +38
       System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +602
       System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +195
       System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +128
    

    My web.config has the HTML Agility Pack:

          <dependentAssembly>
        <assemblyIdentity name="HtmlAgilityPack" publicKeyToken="bd319b19eaf3b43a" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-1.4.9.5" newVersion="1.4.9.5" />
      </dependentAssembly>
    

    The DLL version in the Bin folder is 1.4.9.5.

    I'm assuming I maybe need to upgrade the HTMLAgilityPack version? But when I try to do this via nuget it tries to upgrade the whole thing to Umb8.

    I think Dialogue package for Umbraco is EOL now? I cant see reference to it?

    Anyone know how to fix, or is experiencing the same error?

  • Neil Hodges 338 posts 987 karma points
    Mar 28, 2020 @ 14:22
    Neil Hodges
    100

    For anybody stumbling across this, I downloaded an old backup of the site and copied over the DLL.

    Updated the reference in the web.config and it's back working.

Please Sign in or register to post replies

Write your reply to:

Draft