Viewing eml files creates junk in temp folder using document viewer API for .NET

Hi, we are using the old legacy viewer on an asp.net web application using 2.16 version.

A customer has reported to us that viewing eml, viewer creates junk files on c:\windows\temp or on temp folder of user that is running the pool of the web app.
The files seem to be random files, but actually rename for example in pdf, you can see them quietly. (see image attached)
The real problem, however, is that all of these files occupy disk space and consequently occupy the whole disk.

We know that you no longer support this old version, but we were wondering if you had a solution, which is not to go and delete the files manually every time the problem arises.

Thank you.

Hi,


Thank you for the request. I tried to reproduce the issue but unfortunately it not reproduced on my local. Could you please share with me the source code example of the Viewer code that you use to initialize the Viewer (something like this) and the Viewer code that you use to view the files.

Best regards.

We intialize it on global.asax:

protected void Application_Start(object sender, EventArgs e)
{
log4net.Config.XmlConfigurator.Configure();
log.Info(“Application start: " + DateTime.Now);
GetProductInfo();
// viewer license path
Viewer.SetLicensePath(Server.MapPath(@”~\licenses\GroupDocs.Total.for.NET.lic"));
// viewer temp path
Viewer.SetRootStoragePath(Server.MapPath(@"~\sWebNet\Card\Preview\CachePreview"));
log.Info(“Finish application start: " + DateTime.Now);
}

on server side to view files:
viewerCode = Viewer.ClientCode()
.TargetElementSelector(”#viewer")
.Stream(byteStream, fileNameViewer, extension, fileNameDisplay, true)
.ShowDownload()
.EnableRightClickMenu(false)
.Layout(ViewerMode.ScrollView)
.PreloadPagesCount(2)
.Quality(40)
.EnableStandardErrorHandling(false)
.BackgroundColor("#00648C").ThumbnailsContainerWidth(204)
.UseHtmlBasedEngine(true)
.ShowFolderBrowser(false)
.ShowViewerStyleControl(false)
.UseInnerThumbnails(true)
.OpenThumbnails(false)
.UseVirtualScrolling(true)
.ShowZoom(true)
.ZoomToFitHeight(true)
.ShowThumbnails(true)
.SupportTextSelection(true)
.MinimumImageWidth(700)
.SupportPageRotation(true).ToString();

Try open .eml files with attachments, then look on C:/windows/temp or into temp folder of the user that run iis pool (don’t use iis express!!!)

Thank you

Hi,


Thank you for this information. All cache files saved in the C:/windows/temp or into temp folder of the user that run iis pool is saved by the IIS it self not by the Viewer. As you can see in these folders there is not only the temp pdf file for the eml representation but all temp files required by the iis. As you know not any web application doesn’t have direct access to the Windows folder and the Viewer as well.

GroupDocs.Viewer saves all it’s temp files in the “temp” folder under the path which you use in the Viewer.SetRootStoragePath()

Since that open a command prompt, type SET and see what is listed in TEMP and TMP. You have to change within the environment variables.

Best regards.