Incorrect Document Display when file size and extension are same

Hi Group Docs Team,

i am using Group Docs Viewer for .Net for MSCRM.
currently the caching file name is generated by groupDocs inbuild process with format as
_DivDocumentViewer.extension.

Now when we are fetching document to display, we are getting wrong document due to same file extension and same file size.
below is the address of cached files which occur for multiple files:
...\Cache\temp\GroupdocsDownloads\FromStream\_divDocumentViewer37691.doc\2014-09-11T15_02_06\@x.Pdf

here is the implementation details of groupDocs in application :
<%=
GroupdocsViewer.ClientCode()
.TargetElementSelector("#divDocumentViewer")
.Stream(this.fileStream, this.fileExtention)
.DocViewerId("doc_viewer1")
.EnableRightClickMenu(true)
.ShowThumbnails(true)
.OpenThumbnails(false)
.ShowPrint(false)
.ZoomToFitWidth(true)
.Height(500)
.Locale("en-US")
.ZoomToFitWidth(true)
.BackgroundColor("#00005C")
.ShowFolderBrowser(false)
.ShowPaging(true)
%>

root storage path :
GroupdocsViewer.SetRootStoragePath(Server.MapPath("~/Cache/"));


could you please suggest a way by which we can retrieve distinct cached document by a unique identifier or some Guid.

please let me know if you needed some further information.

Puneet Rajak


Hello Puneet,

We are sorry to hear that you have this issue. This is the well-known problem, it was fixed in the GroupDocs.Viewer ver 2.0, it is also described in the article “How to Use GroupDocs.Viewer with Streams in ASP.NET MVC or WebForms Projects”.

From the code that you have provided we see that you are using old version of GroupDocs.Viewer for .NET, perhaps version 1.6.

So, in order to fix the issue you need to:
1. Download the latest version of GroupDocs.Viewer for .NET - 2.3.0.
2. Use “Stream” method with parameters “fileName” and “fileExtension”, for example “.Stream(this.fileStream, some_filename, this.fileExtention)”.
3. Remove “DocViewerId” method - it is outdated since version 2.0.
That’s all.

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