<span style=“font-family: “PT Sans”, Helvetica, Arial, sans-serif; font-size: 14px; background-color: rgb(242, 242, 242);”>Error shown:
<span style=“font-family: “PT Sans”, Helvetica, Arial, sans-serif; font-size: 14px; background-color: rgb(242, 242, 242);”>
<span style=“font-family: “PT Sans”, Helvetica, Arial, sans-serif; font-size: 14px; background-color: rgb(242, 242, 242);”>Could not find a part of the path ‘D:\temp\2017-05-03 ASP.NET_MVC_Front_End\ASP.NET_MVC_Front_End\App_Data\temp\A4464.C490.ClaimControl TEST.msg\html\resources\page1\styles.css’.
<span style=“font-family: “PT Sans”, Helvetica, Arial, sans-serif; font-size: 14px; background-color: rgb(242, 242, 242);”>
<span style=“font-family: “PT Sans”, Helvetica, Arial, sans-serif; font-size: 14px; background-color: rgb(242, 242, 242);”>But the temp folder contains a folder called:
A4464_C490_ClaimControl TEST_msg
This was done with a download of the MVC_Front_End source code today.
Downgrading to version 17.1.0 with nuget package manager:
uninstall-package groupdocs-viewer-dotnet
install-package groupdocs-viewer-dotnet -version 17.1.0
Results in compilation errors due to changes in the API. (Changes to HtmlOptions and RotatePageOptions) so I am unable to test that scenario with this version of the MVC_Front_End app.
Note - this error only occurs when viewing .MSG files in HTML mode - Image mode is working in the demo app.
The error is thrown from the File.WriteAllText() call as _tempPath contains the . characters:
MvcSample.dll!MvcSample.Controllers.ViewerController.GetHtmlPages(string filePath, GroupDocs.Viewer.Converter.Options.HtmlOptions htmlOptions, out System.Collections.Generic.List cssList) Line 599 C#
MvcSample.dll!MvcSample.Controllers.ViewerController.ViewDocumentAsHtml(MvcSample.Models.ViewDocumentParameters request, MvcSample.Models.ViewDocumentResponse result, string fileName) Line 780 C#
MvcSample.dll!MvcSample.Controllers.ViewerController.ViewDocument(MvcSample.Models.ViewDocumentParameters request) Line 91 C#
However I can now see that tempPath is calculated in the demo app rather than from the GroupDocs.DLL - so the fix is to the demo app - add .Replace(".", "") to the file name at line 602:
if (needResave)
{
var fullPath = Path.Combine(tempPath, filePath.Replace(’.’, '’), “html”, “resources”,
string.Format(“page{0}”, page.PageNumber), resource.ResourceName);
System.IO.File.WriteAllText(fullPath, text);
}