Free Support Forum - groupdocs.com

Can't run Comparison demo project withous IIS Express


#1

Hello,

i’m trying to include Comparison tools but started with demo project, precisely the GroupDocsComparisonStreamsAsInputMvcDemo.
This runs as default with IIS express checked. Trying to disable it, the project doesn’t load the comparison window, generating in browser console this list of resource load error:

GET http://localhost/gd-comparison/embedded/scripts/comparison2/views/widgets/diff-navigator.html 404 (Not Found) jquery-1.7.1.min.js:4
2014-11-06 15:51:43.036GET http://localhost/gd-comparison/embedded/scripts/comparison2/views/widgets/document-thumbnails.html 404 (Not Found) jquery-1.7.1.min.js:4
2014-11-06 15:51:43.069GET http://localhost/gd-comparison/embedded/scripts/comparison2/views/widgets/document-viewer.html 404 (Not Found) jquery-1.7.1.min.js:4
2014-11-06 15:51:43.088GET http://localhost/gd-comparison/embedded/scripts/comparison2/views/widgets/diff-explorer.html 404 (Not Found) jquery-1.7.1.min.js:4
2014-11-06 15:51:43.097Uncaught TypeError: undefined is not a function core?v=Oci_WnFsXXeSPoZsUIAy6sTeRT8gOeOtVv515hcQDlU1:1
2014-11-06 15:51:43.127GET http://localhost/gd-comparison/embedded/images/mainbg.png 404 (Not Found) jquery-1.7.1.min.js:4
2014-11-06 15:51:43.127GET http://localhost/gd-comparison/embedded/images/sprites.png 404 (Not Found) jquery-1.7.1.min.js:4

I’m using IIS 7 on windows server 2012 r2. Any help will be very helpful, thanks

Gianluca

#2

Hello Gianluca,

We are sorry to hear that you have this issue. We were able to reproduce this issue. It is a bug in the GroupDocs.Comparison for .NET, it will be fixed in the version 2.2.0 which hopefully will be available in the beginning of the next week. When it will be released, we will notify you at this forum thread.

Thanks and sorry for the inconvenience.


#3

Hello,

I downloaded the yesterday new comparison dll to verify that the bug has been corrected. I’ve overwrited the old dll with the new one in reference path and try to run the project (not with IIS express, that was the problem) but still get same errors. Have i much more to do to get the Comparison updated?
Thanks

Gianluca

#4

Hello Gianluca,

We are sorry to hear that you have this issue. Here is a final version 2.2.0 of the GroupDocs.Comparison for .NET. Actually, the described bug should be fixed in this version, we cannot reproduce it more.

Please tell more about your project and environment:
1. Are you still using the “GroupDocsComparisonStreamsAsInputMvcDemo” project from the Sample Demo without modifications? Please try to use the latest version of the “GroupDocs.Comparison C# Demos”, which was updated today (November 14).
2. Which web-server are you using? Please keep in mind that GroupDocs.Comparison supports only IIS and IIS Express and doesn’t support ASP.NET Development Server.

Thanks and waiting for your reply.


#5

Hi. I’m using still the project that uses streams, Tried to download the updated demo projects but still get the same errors. In browser console, i can see many resources with 404 errors like:

  • diff-navigator.html
  • document-thumbnails.html
  • document-viewer.html
  • diff-explorer.html
  • sprites.png
  • mainbg.png
  • favicon.ico
and get javascript errors that block the comparison process.
Please try to replicate , this issue block me in comparison inclusion in other projects.

UPDATE: try to run GroupDocsComparisonMVCDemo without IIS express and run correctely, the problem is with stream project.

Gianluca

#6

This issue was partially solved via Live Chat.


#7

Hi,

unfortunately the problem wasn’t really resolved cause the project was accidentally run with IIS express so there is still the same problems in loading html (but not js) files…

Gianluca

#8

Hello Gianluca,

It seems that there is a little misunderstanding here. Let’s clarify the situation. There are two projects, which you’ve worked on: “GroupDocsComparisonMVCDemo” and “GroupDocsComparisonStreamsAsInputMvcDemo”. As you can see from their source code, they are almost the same with only one distinction: in the first project documents are specified as the files, while in the second - as the streams. All other is the same.

Considering all this from the side, there are 3 types of errors: bugs in the GroupDocs.Comparison library, issues (mistakes, improper configuration, etc.) in the sample projects, and issues with environment configuration (.NET Framework, web-server, DNS etc.).

If I’m not mistaken, you were able to successfully run some of these two projects in the MS Visual Studio using the IIS Express web-server. From that fact we can conclude that the GroupDocs.Comparison library and the sample project is Okay.

GroupDocs.Comparison supports IIS ver 6.0+, as it can be seen from here:

http://eu-apps.groupdocs.com:89/ --> http://prntscr.com/57m7uv

http://eu-apps2.groupdocs.com:81/ --> http://prntscr.com/57m8rf


There is a little confusion, when you state that you are using the IIS version 7 at the Windows Server 2012 R2, because Windows Server 2012 R2 contains IIS 8.5, but this should not be the problem.

Unfortunately I cannot tell you what should be fixed/tweaked because I have no access to your machine. But I can say how it should be configured in order to make it work. This is not the only way to configure the web-site with the GroupDocs.Comparison, but this way is the most robust that I know.

1. Create a new application pool, which works in the Integrated mode and .NET v.4.0.
2. Copy a project folder (not the solution folder, but the project folder) to the web-server, if it is a distinct machine. Web-sites are usually stored in the “inetpub” folder.
3. Create a new web-site. You should create especially a new web-site, but not to add it to the “Default Web Site” (localhost) as a new Virtual Directory. Specify a newly created application pool for this web-site.
4. Specify a new unique internal URL for a new web-site. For example, “comparison.web”. Add this entry to your “hosts” file: 127.0.0.1 comparison.web - it should be your own local DNS.
5. Allow full access for the whole project folder: RMB click on the web-site name -> Edit Permissions -> Security -> (add full access for the current user).
6. Restart the whole IIS web-server.

If this instruction will not help, I’m afraid I will not be able to help you without remote access via TeamViewer.

#9

Hi Denis,


The problem was due to the fact that my site was running as Application of the default web site (and the problem is present also if i create another site). Is there a reason to avoid the use of Comparison tools with a site running as an application? I’m asking this because this is our case and we can’t run our site as site but only as application. Is there any way to make it work running with an application?

Anyway, thanks for the response, setting my site as standalone site it works but need to run as application!

Gianluca

#10

Hello Gianluca,

Finally, with your latest clarification we were able to understand the exact scenario of how you are using the GroupDocs.Comparison with IIS. And, yes, we are able to reproduce the issue especially when deploying a web-site as a “child” application (Virtual Directory) for the Default Web Site (localhost).

Our developers will release a special version 2.2.1 of the GroupDocs.Comparison for .NET, where this issue should be eliminated along with some other fixes. We will notify you in this forum thread when it will be ready for download and usage.

Thanks and sorry for the inconvenience.


#11

Hi,

that’s great!
Is there any date for this release. It’s very urgent for us because we have deadline development dates in few time to respect.

Thanks

Gianluca

#12

Hello Gianluca,

According to the plans of the GroupDocs.Comparison development team, the version 2.2.1 (which should contain a fix of the discussed issue) should be released till the end of the next week. But because you’ve said that this is very urgent and important, we will prepare a special internal intermediate version especially for you. It will be ready tomorrow about noon. It will be special a version without passed QAing, but most likely it will be safe from regression bugs. Please confirm is this Okay for you?

Thanks.


#13

Hello Denis,

it’s okay, anyway our quality department will test our software and also the comparison element so if there will be any problem we will wait for official release but think that this will not be the case.
Thanks for updates and speed, i’ll wait for news about this beta version to update our project!

ADDED: In comparison namespace, what the “ComparisonSaving” method stands for? can you provide a simple example of use of this? thanks

Nice day
Gianluca

#14

Hello Gianluca,

The intermediate special version of the GroupDocs.Comparison 2.2.1 is ready, we’ve sent it to your email address (gian.boscolo@xxxxx).

What about the “ComparisonSaving” method. This is actually an event handler: http://prntscr.com/58l65x
The event is fired when the redline file (result) is ready and is about to save. This allow the developer to handle the saving e.g. to save a readline document into the stream. So you should use it only when you want to save the result of comparison right into the stream, not as the file.

If you will have more questions please feel free to contact us.


#15

Hi Denis,

tried your new .dll and finally works!
Making some tests i’ve some questions:
  • how the manage of cache folder is do? With comparison there isn’t an equivalent as for viewer to clean old documents and the temp folder grows up on dimensions (please remember that we works with file streams and not file paths)
  • pdf comparison doesn’t seems to work correctely… it show always the target files and no differences. in plus, it seems that the final report page, disabled in comparison creation, it’s shown only with this file extension.
  • txt files give open document error and cannot be compared.
  • How to do localization for this tool and viewer too? in particular, we’re interested on italian
  • Is possible to get a stream of the file after making review on differences on document (for example, undo of an edit…
  • for setting of the viewer and comparison folder cache as i said some below, i used the SetRootStoragePath methods of the two tools in global.asax but this take to the use, for both tools, of the last setted folder. This can be a problem i think for concurrency.
  • The initialization of components seems to set the BundleTable.EnableOptimizations to false
Thank you!

Gianluca

#16

Hello Gianluca,

We are glad that this version was helpful for you. Now what about the questions:

1. (About clearing the cache) GroupDocs.Viewer internally uses the GroupDocs.Viewer, so you can use the part of the Viewer’s methods. In particular, if you want to clear the cache, you should invoke the “Groupdocs.Web.UI.DocumentCache.RemoveOldEntries” instance method.

2. (About incorrect PDF comparison) It can be, but in order to investigate and reproduce that we need these PDF files.

3. (TXT is not working) Yes, we are able to reproduce this issue. This is a bug, and will be fixed soon.

4. (Localization) GroupDocs.Comparison currently doesn’t have localizations and there is no ability to inject your own localization into it. There are plans to include localization (like it is present in the GroupDocs.Viewer) in the version 2.3 which should be released at the end of December. We will prepare a document with all phrases and will send it to you. Then you provide their Italian equivalents for us, and our developers inject them to the GroupDocs.Comparison.

5. It is not clear what exactly you want to do. If you want to obtain a result of the comparison (Redline document) as a stream, not as a file - yes, this is possible. You should use the “ComparisonSaving” event handler with attached “ComparisonSaveHandler” delegate. Here is a ready-to-use example (ASP.NET MVC):

public class HomeController : Controller
{
public ActionResult Index()


{


const string sourceFileName = “Tables.Source.docx”;


const string targetFileName = “Tables.Target.docx”;



ComparisonSaveHandler delegate_instance = StrHandler;



using (var sourceStream = System.IO.File.OpenRead(Server.MapPath("~/App_Data/" + sourceFileName)))


using (var targetStream = System.IO.File.OpenRead(Server.MapPath("~/App_Data/" + targetFileName)))


{



GroupdocsComparison.Comparison("#comparison-wrapper")




.SourceFileName(sourceFileName, sourceStream)




.TargetFileName(targetFileName, targetStream)




.ImmediateCompare()




.ComparisonSaving += delegate_instance;


}


return View();


}



private void StrHandler(Stream Input, out String Filename)


{


Filename = “str_res.docx”;


Int64 len = Input.Length;


//stream “Input” contains Redline document and is ready to use


}
}


6. Here is a problem because, as it was said before, GroupDocs.Comparison internally uses GroupDocs.Viewer. Our developers have to do some test for such scenario, but they will not be able to give any feedback of this till Thursday.

7. (setting the “BundleTable.EnableOptimizations” parameter’s value to “false”) This is a known bug, it will be fixed shortly.

If you will have more questions please feel free to contact us.


#17

Hi Denis, Thanks for the response. In order:

  1. Using the same method of Viewer, i obtain that temp folders are empty but the comparison result file isn’t deleted. Is there any way to delete it with some method?
  2. Can’t attach a file to this response, the add/update section doesn’t seems to work correctely
4. Ok , we’ll wait for the string to translate but with the possibility of change language as on viewer.
5. I wanna save the document, after the user has selected the differences to approve and the differences to disapprove. I think that the example you provide give me the stream of initial merged document, not the document with user differences edit. Moreover, the provided example, inserted in MVC project give error “Expression must return a value to render” in creation comparison row…
6. wait a response for this if possible
7. that’s perfect.

Anyway, we’ll wait for the release of official version this week,
Greetings
Gianluca



#18

Hello Gianluca,

1. “Groupdocs.Web.UI.DocumentCache.RemoveOldEntries” instance method removes the cached files from the “temp” folder. For example, when specifying the:
Groupdocs.Web.UI.DocumentCache dc = new Groupdocs.Web.UI.DocumentCache(null, Server.MapPath("~/App_Data/"));
dc.RemoveOldEntries(new TimeSpan());

it removes all content from the “\temp\Cache” and “\temp\Processing” subfolders. Please describe, about which comparison result file are you talking? If you mean the “Redline” file that is present in the “root storage” folder, then yes, this method doesn’t remove the result file, because it handles only cache, when the “Redline” file is not a cache. After removing the “Redline” file the comparison result will not be available any more. However, if you still want to remove that file, you can do this by using standard built-in .NET IO methods.

2. Hmm, strange, but in any case you can send this file to us via email, or upload it to the Dropbox or any similar online sharing resource and provide a link.

3. Here is an updated version 2.2.1.0 of GroupDocs.Comparison for .NET, text comparison is not working.

5. It’s hard to give you a clear and accurate answer without clear understanding what exact you are doing and in which form you want to obtain the result. Can you please provide us a part of source code, which can illustrate your intentions?

7. The bug with “BundleTable.EnableOptimizations” parameter is fixed in the latest version, which I specified in the item No 3 above.

If you will have more questions please feel free to contact us.


#19
  1. Think that would be correct to have a method to clear the redline files to avoid temp folder grow up in dimensions… The presence of a method like this (with the possibility to set a time span) is the best way to guarantee concurrency on files…
    2. i uploaded the files on Google Drive folder


    please try to reproduce

    3. When will text compare resolved?

    4. It’s possible to know, before opening the viewer, if the format is supported? (avoiding swicth/case blocks of course)

    UPDATE: i founded another issue with Viewer. In the same folder of google drive i updated a new pdf that has problem with some characters on first page. Please compare the acrobat reader and viewer rendering of it.

    Thanks

    Gianluca

#20

Hello Gianluca,

Sorry for long reply.

1. I think that there is a little misunderstanding about how GroupDocs.Comparison works and what is the cache. As you know, GroupDocs.Comparison internally uses GroupDocs.Viewer. When you specify two files (Source and Target), GroupDocs.Comparison obtains them, performs a parsing, analysing, and generates an output file (Redline), which GroupDocs.Comparison puts to the root storage folder (which at this moment was specified in the “GroupdocsComparison.SetRootStoragePath” method). It doesn’t generate the cache, doesn’t show the Redline document in the browser, it just generates a Redline file and saves it to the root storage.

Then it’s time for the GroupDocs.Viewer. Your browser cannot display a document of any type, it can display only web-pages. So the GroupDocs.Viewer obtains a Redline document, converts it to the set of HTML markup, images, CSS, SVG and JS (this set is what is called cache) and puts all of these to the “/temp” subfolder. And only then GroupDocs.Viewer sends these cache files to the client-side, and you see a Redline document in the browser.

Groupdocs.Web.UI.DocumentCache” class and its method “RemoveOldEntries” is responsible only for the cache. It’s not a problem when the cache files will be removed: GroupDocs.Viewer detects its absence, opens the Redline document and generates new cache one more time. That’s why “RemoveOldEntries” method doesn’t remove Redline: Redline is not a cache.

If you do want to remove especially the Redline document, it can be easily done:
using System.IO;





File.Delete(GroupdocsComparison.GetRootStoragePath() + “Redline.docx”);

If you want to remove all content from the root storage, it requires a little bit more coding: How to delete all files and folders in a directory?
But if these ways are not suitable for you, and you want to perform such operation using the GroupDocs.Comparison API - I think it should not be the problem.

2. Thank you for providing the files and pointing out on errors. Yes, we can reproduce incorrect comparison, our developers started to work on it. We will notify you in this forum thread, when the new version will be ready.

3. Text comparison was already resolved in the GroupDocs.Comparison for .NET version 2.2.1.0, which I provided in the previous post. Sorry, it was my typo: I wrote “text comparison is not working” instead of “text comparison is working” and only now I’ve noticed this error.

4. Yes, it is possible. You should use ahead-of-time caching using the “DocumentCache” class. This methods performs the same operation, which is performed when you open the document, with one distinction: it doesn’t “transfer” the cache to the browser. Use the “GenerateImages” method for the image-based rendering mode or “GenerateHtml” for HTML-based mode, and if these methods will not throw an exception, then the document can be displayed in the browser.

5. Yes, we can reproduce the rendering bug in the GroupDocs.Viewer, when displaying the file “Installazione Archiflow 8.pdf” in the HTML-based rendering mode. Our developers started to investigate the bug. As the temporary solution, you can display this particular document in the image-based rendering mode - we didn’t noticed distortions when using this mode.

Thanks.