Error viewing PPTX- XLSX- and DOCX

Using the 2.0 .Net viewer, if I attempt to view DOCX, XLSX, or PPTX files the exception shown below is thrown. I didn’t have this problem with the previous version.



My code for setting up the viewer looks like this:

ClientHelper ch = Viewer.ClientCode();

ch.Stream(stream, fileExtension);



ch.BackgroundColor(GetStringFromRequest(“BackgroundColor”, “#526593”));

ch.OpenThumbnails(GetBooleanFromRequest(“OpenThumbnails”, false));

ch.ShowFolderBrowser(false);

ch.TargetElementSelector("#documentViewer");

return ch.ToString();



Exception:

Could not load file or assembly ‘ICSharpCode.SharpZipLib, Version=0.86.0.518, Culture=neutral, PublicKeyToken=1b03e6acf1164f73’ or one of its dependencies. The system cannot find the file specified.



Stack trace:

at Groupdocs.Utils.DTResolver.(Stream content)

at Groupdocs.Utils.DTResolver.(Stream content)

at Groupdocs.Utils.DTResolver.Resolve(Stream content)

at Groupdocs.Web.UI.ClientHelper.()

at Groupdocs.Web.UI.ClientHelper.ToString()



Can you please confirm that these file types view successfully for you and let me know if there are other changes I should make to my code?



Thanks,

Don

Hello Don,

We are sorry to hear that you have such issue. We can confirm that GroupDocs.Viewer for .NET Library supports all of mentioned file type formats.
About the issue, we replied to your other post, so you can check it here - http://groupdocs.com https://forum.aspose.com/t/3758 .
Regarding to requested library (ICSharpCode.SharpZipLib) – generally GroupDocs.Viewer for .NET should not require this library. Since that could you please share with us sample of your project? In this case we will be able to explore all issues and fix them for you.

It’s not practical for me to deliver a copy of the project because it’s part of a large web application.



The application works properly when I use Groupdocs.Viewer.dll version 1.5.0.0. It fails with the exception reported previously when I use version 2.0.0.0.



The only code change I made between the two versions was to comment out the a call to DocViewerId that is unnecessary in the new version of GroupDocs.



The only web.config changes I’ve made are to add a handler for GetPdf2XmlHandler copied from your sample that looks like this:





One other change (again from your sample) is to add the GET verb to the reference to GetPdf2JavaScriptHandler.



Is there anything else necessary to update a project from GroupDocs 1.5 to 2.0?



Thanks,

Don

Hello Don,

Thanks for getting in touch. I’ll gather both topics (this and another “Error viewing TXT, XLS, and MSG files”) into this one since yours problems are similar.

It is hard to define a problem without access to project and target documents. GroupDocs.Viewer for .NET version 2.0 in fact supports all formats that previous versions support and has minimal differences.

There are plenty of versions 2.0.x.x, and “2.0.0.0” that you specified is not a version of assembly - it is a version of file. In order to define assembly version you should find a reference to the GroupDocs.Viewer library in your project, select a “Properties” item in the context menu and then check the “Version” label.

Now I’ll send you at dwaldo@handshakesoftware.com a mail message with link to the GroupDocs.Viewer for .NET version 2.0.5246.32439. I’ve double checked it today - it works well with all formats that you had specified. Please try to use it in your project.

Speaking about version 2.0 changes, we have an article which describes all changes: “GroupDocs.Viewer 2.0 – Enhancements and New Features in the Document Viewer for .NET Library (Part A)” and “GroupDocs.Viewer 2.0 – New Features and Improvements in the Document Viewer for .NET Library (Part B)”. If your documents are transfered to GroupDocs.Viewer as streams - please note that “Stream” method now has another signature.

Also please make sure that your documents are not corrupted.

Please come back to us after you will try to use the version that I’m sending to you and we will reply to you with solution soon.