Unable to compile document editing WebForms application

I thank you for your reply, but I am sorry that’s not possible for me to do. I’d expect an example to be as simple as “1) download and 2) compile”. This is not the case with your example.

@sgbrUnisys

There are some dependencies that you have to restore or install the project will be compiled without any issue/error.

Thank you for stating what you think should happen. As a customer, I can tell you that is not what happens.

@sgbrUnisys

We’ll surely help you in fixing the issue. Please share your operating system details (e.g. version).
However, please have a look at this video. We followed these steps:

  • Downloaded the project
  • Restored NuGet packages
  • Build the project
  • Started/ran the project without debugging (ctrl + F5)

I am getting the following error when the editorDomainGenerator.SetEditorLicense() method is called:

“System.IO.FileLoadException: ‘Could not load file or assembly ‘GroupDocs.Editor, Version=21.1.1.0, Culture=neutral, PublicKeyToken=716fcc553a201e56’ or one of its dependencies. The located assembly’s manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)’”

I don’t have a license file and just want to try with the trial license.

In
public DomainGenerator(string assemblyName, string className)
{
globalConfiguration = new GlobalConfiguration();
// Get assembly path
string assemblyPath = GetAssemblyPath(assemblyName);
// Initiate GroupDocs license class
CurrentType = this.CreateDomain(assemblyName + “Domain”, assemblyPath, className);
}

The configuration and the assembly path are loaded correctly and showing what they should be.
However, the CurrentType is null as per the above exception the DLL is not being loaded. I have checked that the NuGet package is installed and added. I have even downloaded and installed the msi version (groupdocs.editor_21.1.1-net.msi)

The following might help the technical team to help me solve the problem.

From the exception:

GroupDocs.Editor, Version=21.1.1.0, Culture=neutral, PublicKeyToken=716fcc553a201e56

=== Pre-bind state information ===

LOG: DisplayName = GroupDocs.Editor, Version=21.1.1.0, Culture=neutral, PublicKeyToken=716fcc553a201e56

(Fully-specified)

LOG: Appbase = file:///C:/code/POC/GroupDocs.Editor/GroupDocs.Editor/

LOG: Initial PrivatePath = C:\code\POC\GroupDocs.Editor\GroupDocs.Editor\bin

Calling assembly : GroupDocs.Editor, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null.

===

LOG: This bind starts in default load context.

LOG: Using application configuration file: C:\code\POC\GroupDocs.Editor\GroupDocs.Editor\web.config

LOG: Using host configuration file: C:\Users\SolteszG\Documents\IISExpress\config\aspnet.config

LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.

LOG: Post-policy reference: GroupDocs.Editor, Version=21.1.1.0, Culture=neutral, PublicKeyToken=716fcc553a201e56

LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/Temporary ASP.NET Files/vs/44a3bd28/239e2877/GroupDocs.Editor.DLL.

LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/Temporary ASP.NET Files/vs/44a3bd28/239e2877/GroupDocs.Editor/GroupDocs.Editor.DLL.

LOG: Attempting download of new URL file:///C:/code/POC/GroupDocs.Editor/GroupDocs.Editor/bin/GroupDocs.Editor.DLL. ß this is a valid path

WRN: Comparing the assembly name resulted in the mismatch: Major Version

ERR: Failed to complete setup of assembly (hr = 0x80131040). Probing terminated.

Could not load file or assembly ‘GroupDocs.Editor, Version=21.1.1.0, Culture=neutral, PublicKeyToken=716fcc553a201e56’ or one of its dependencies. The located assembly’s manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

at GroupDocs.Editor.GroupDocsCore.DomainGenerator.SetEditorLicense() in C:\code\POC\GroupDocs.Editor\GroupDocs.Editor\GroupDocsCore\DomainGenerator.cs:line 72

at GroupDocs.Editor.Global.Application_Start(Object sender, EventArgs e) in C:\code\POC\GroupDocs.Editor\GroupDocs.Editor\Global.asax.cs:line 14

InnerException is null

Solution is .Net Framework 4.8 with runtime 4.8.

Please find the web.config file attached for your reference.

web.config:

<?xml version="1.0" encoding="utf-8"?>

@sgbrUnisys

Were you able to compile/run application using the above mentioned steps (by default application is using 20.8)?
Are you trying to upgrade the API version in same application?

Thank you for the video. The steps show in the video of downloading the code, opening the solution in visual studio and then simply compiling isn’t the same as what I experienced. Opening the solution an clicking on build gives numerous errors.

My use case and steps to reproduce:

  1. open visual studio 2019
  2. create a new ASP.Net Web Application (.Net Framework 4.8)
  3. add GroupDocs.Editor from NuGet
  4. write example code in default.aspx as follows:

using (Editor editor = new Editor(documentPath))
{
// Obtain editable document from original DOCX document
WordProcessingEditOptions editOptions = new WordProcessingEditOptions();
EditableDocument editableDocument = editor.Edit(editOptions);

            // Pass EditableDocument object to WYSIWYG editor and edit there...
  1. Add the following to the global.ascx.cs Application_Start:
    // Set GroupDocs products assemblies names
    string editorAssemblyName = “GroupDocs.Editor.dll”;
    // set GroupDocs.Editor license
    DomainGenerator editorDomainGenerator = new DomainGenerator(editorAssemblyName, “GroupDocs.Editor.License”);
    editorDomainGenerator.SetEditorLicense();

  2. Ensure the types are copied over from your example solution and I’ve corrected the configuration to use web.config instead of the yaml resolver (which is not standard for WebForms application configuration).

  3. Compile: success

  4. run: exception as above. The DLL does not load correctly. It needs a reference library that is not part of the standard .net framework or your NuGet installation, otherwise it would resolve.

Can you give me a list of components the DLL needs?

I’ve tried a few recordings, I’ll share the link with you privately via George. Thanks for your continued efforts in trying to resolve these POC issues.

1 Like

@sgbrUnisys

We’ll appreciate that.

Hi Tahir

I hope you received the video recordings from George.

I had a look at your library using Resharper over the weekend and the Assembly Explorer shows a number of Aspose component references:

image001.png

Inspecting the NuGet packages folder as well as the bin folder of the solution, these Aspose components are not present in the solution folder / packages folder.

Do I need to have a version of Aspose installed for your DLL (GroupDocs.Editor.DLL) to load correctly?

I don’t have Aspose installed, and assumed that if I add the GroupDocs.Editor NuGet package, then it will add all the necessary dependencies as well.

Could you please let me know what you think?

Thank you

Kind regards

Gabor

image002.jpg (2.48 KB)

image003.jpg (393 Bytes)

Hello Gabor,

Sorry for not updating you on this.

Yes, the video was shared with Atir. He logged the issue with GitHub, and it is currently being investigated. Please see the link below for the latest on this.

https://github.com/groupdocs-editor/GroupDocs.Editor-for-.NET-WebForms/issues/15

@atir tahir via GroupDocs please respond to Gabor following her below email with further information.

Best Regards,

George Wright

Regional Sales Manager

image005.png

World-leading Digital Transformation Solutions and Components

Greatstone International Ltd | Parley Brook Farm | Woking | GU21 4XR

T**:** +44 (0) 1276 855 580 M: +44 (0) 7788 261 189

george@greatstone.co.uk | @Greatstone_Int

A giving partner to The Cure Parkinson’s Trust

www.greatstone.co.uk

The information in this message is confidential and may be legally privileged. It is intended solely for the addressee. Access to this message by any other person is not permitted. If you have received this message by mistake, please notify us immediately by reply email and then delete this message from your system. If you are not the intended recipient any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it is prohibited and may be unlawful.

image001.png (10.2 KB)

image002.jpg (2.48 KB)

image003.jpg (393 Bytes)

You are right. GroupDocs.Editor adds the necessary Aspose dependencies on it’s own. Secondly, we are still investigating the issue (logged on GitHub). You’ll be notified in case of any update.

Hi All, do you have any updates please on this? I’d like to progress my proof of concept this week, however, I can’t do that until all the references are properly resolved via the NuGet package of GroupDocs.Editor.

Thank you
Kind regards
Gabor

@sgbrUnisys

This issue is now fixed. Please pull the latest release here and have a look at this thread.

Thank you. The new version does compile and run as expected. I will now continue creating a POC and let you know if I run into any further issues.

@sgbrUnisys

Glad to know that your issue is resolved.

Hi Team

Thanks for your support thus far.

I am happy to confirm that I had some time to work on the POC this weekend. I have now ran into another issue that I’d like your help with please. To keep the previous thread clean and “closed” I’ve started a new thread online: Inconsistent HTML generation - GroupDocs.Editor Product Family - Free Support Forum - groupdocs.com

This explains that using a sample document (docx) and the GetBodyContent() method, I am getting the correct style tags generated up to about line 167. After this line, a lot of the lines (no all!) have empty style tags generated. This is obviously a show-stopper if this is a limitation of the product. However, it may be that this is some sort of a license limitation, as I note from this page: https://docs.groupdocs.com/editor/java/evaluation-limitations-and-licensing-of-groupdocs-editor/

Could you please take a look and let me know what you think?

Thank you

Kind regards

Gabor

image001.png (10.2 KB)

image002.jpg (2.48 KB)

image003.jpg (393 Bytes)

image001.png (3.54 KB)

1 Like

Hi Gabor,

Following your below thread and communication with Atir, I will try and get you a 30-day unrestricted license. Kindly bear with me as I sort this.

Best Regards,

George Wright

Regional Sales Manager

image007.png

World-leading Digital Transformation Solutions and Components

Greatstone International Ltd | Parley Brook Farm | Woking | GU21 4XR

T**:** +44 (0) 1276 855 580 M: +44 (0) 7788 261 189

george@greatstone.co.uk | @Greatstone_Int

A giving partner to The Cure Parkinson’s Trust

http://www.greatstone.co.uk

The information in this message is confidential and may be legally privileged. It is intended solely for the addressee. Access to this message by any other person is not permitted. If you have received this message by mistake, please notify us immediately by reply email and then delete this message from your system. If you are not the intended recipient any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it is prohibited and may be unlawful.

image001.png (3.54 KB)

image001.png (10.2 KB)

image002.jpg (2.48 KB)

image003.jpg (393 Bytes)