Free Support Forum -

HTML comparison issue in ASP.NET MVC application

I added HTML to the list of supported types so I could try to, well, do HTML file comparisons. In the GetCompareResultResponse method in ComparisonServiceImpl.cs it throws an error in this line:

List pages = SaveImages(compareResult.GetImages(), guid);

On the GetImages() call. It returns an exception that says “Length cannot be less than zero.” and “Parameter name: length”.

Stack trace is:

" at System.String.Substring(Int32 startIndex, Int32 length)\r\n at \u000f​ .SaveImages(String \u0002)\r\n at \u000f​ .GetImages()\r\n at GroupDocs.Comparison.MVC.Products.Comparison.Service.ComparisonServiceImpl.GetCompareResultResponse(ICompareResult compareResult) in D:\Code\GroupDocs-MVC\src\Products\Comparison\Service\ComparisonServiceImpl.cs:line 354\r\n at GroupDocs.Comparison.MVC.Products.Comparison.Service.ComparisonServiceImpl.CompareFiles(Stream firstContent, String firstPassword, Stream secondContent, String secondPassword, String fileExt) in D:\Code\GroupDocs-MVC\src\Products\Comparison\Service\ComparisonServiceImpl.cs:line 207\r\n at GroupDocs.Comparison.MVC.Products.Comparison.Controllers.ComparisonApiController.CompareFiles() in D:\Code\GroupDocs-MVC\src\Products\Comparison\Controllers\ComparisonApiController.cs:line 218"

I’m just starting to evaluate the tool, so no experience with it other than this morning. Any idea how I can get beyond this?


Thanks for taking interest in GroupDocs.Comparison for .NET and posting your concerns.
Please provide following details and we’ll be glad to help you out:

  • Are you using any of our GroupDocs.Comparison for .NET showcase project?
  • Problematic (source and target) HTML files
  • Tell us API version that you integrated in the project

I was using the GroupDocs for MVC UI showcase project.

API from nuget package says 18.11.0.

Any HTML files give the error. I’ve probably not done everything needed to support HTML in the project. Can you offer guidance on how to do it so I can see what I missed?


We have logged this issue in our showcase project at GitHub. We’ll look into it and once we have any update, we’ll notify you. Please click here for future correspondence and updates regarding this issue.


We are pleased to inform you that your reported issue is now resolved. Please clone or download latest version of the showcase project and share your feedback.