Free Support Forum - groupdocs.com

Failed To Load resource Error when using UseHtmlBasedEngine


#1

Hello,


I am getting “Failed To Load resource” error when using UseHtmlBasedEngine option im MVC 5 project.

Viewer renders correctly. All options and buttons are present and have correct images. But document is missing fonts and browser displays error for all .woff files when using GetResourceForHtml method (see attached screenshot). When I copy link and navigate to it in the separate window I am getting “Illegal characters in path” error.

I am using Stream method to display document.


Thanks, Ilya.

#2
Hello,

Thank you for your request.

Could you please share with us additional information about your issue:

- current version of the Viewer library that you use;
- your widget code example;
- your web.config file

Please come back to us with these details and we will be glad to help you.

-------

Best regards,
Evgen Efimov

http://groupdocs.com
Your Document Collaboration APIs
Follow us on LinkedIn, Twitter, Facebook and Google+


#3

The issues you have found earlier (filed as WEB-2126) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by GroupDocsNotifier.

#4

Here is my environment Info:

Viewer version 2.16.
Visual Studio 2013
.NET Framework 4.5.1
MVC 5

Here is the code from Global.asax

protected void Application_Start()
{
Groupdocs.Web.UI.Viewer.InitRoutes();
Groupdocs.Web.UI.Viewer.SetRootStoragePath(Server.MapPath("~/_GroupDocsViewer/"));
Groupdocs.Web.UI.Viewer.SetLicensePath(Server.MapPath("~/_GroupDocsViewer/License/GroupDocs.Viewer.lic"));

AreaRegistration.RegisterAllAreas();
FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
RouteConfig.RegisterRoutes(RouteTable.Routes);
BundleConfig.RegisterBundles(BundleTable.Bundles);
}

Here is Viewer Implementation:

@using System.Drawing
@using Groupdocs.Web.UI

@model UI.Models.GroupDocsViewModel

@{
Layout = “~/Views/Shared/_GroupDocsLayout.cshtml”;
bool preventTouchEventsBubbling = false;
}
@{
Stream stream = Model.FileStream;
}

@(Html.ViewerClientCode()
.TargetElementSelector("#gdViewer")
.Stream(Model.FileStream, Model.FileName, Model.FileType, Model.DisplayName)
.ZoomToFitWidth(Model.ZoomToFitWidth)
.ZoomToFitWidth(Model.ZoomToFitWidth)
.BackgroundColor(Model.BackgroundColor)
.ShowHeader(Model.ShowHeader)
.ShowSearch(Model.ShowSearch)
.UseHtmlBasedEngine(Model.UseHtmlBasedEngine)
.DownloadPdfFileIfPossible(Model.DownloadPdfFileIfPossible)
.UseInnerThumbnails(Model.UseInnerThumbnails)
.ShowFolderBrowser(Model.ShowFolderBrowser)
.ShowThumbnails(Model.ShowThumbnails)
.ShowViewerStyleControl(Model.ShowViewerStyleControl)
.SupportPageRotation(Model.SupportPageRotation)
.ToolbarBorderBottomColor("#777")
.ToolbarButtonBorderColor("#625D5D")
.PreloadPagesCount(Model.PreloadPagesCount, Model.LoadPagesOnBrowserSide)
.Quality(Model.ImageQuality)
.PreventTouchEventsBubbling(preventTouchEventsBubbling)
)
@{
stream.Dispose();
}

Attached is my Web.config file.

#5

Hello,


Thank you for the details.

We will investigate them and we will notify you when we will have any news.

--------

Best regards,

Evgen Efimov


http://groupdocs.com
Your Document Collaboration APIs
Follow us on LinkedIn, Twitter, Facebook and Google+


#6
Hello again,

We have tested the scenario and have managed to reproduce the same issue at our side. For the sake of correction, we have logged this problem in our issue tracking system as WEB-2126. We have linked this forum thread to the same issue and you will be notified via this forum thread once this issue is resolved.

We apologize for the inconvenience.

-------

Best regards,
Evgen Efimov

http://groupdocs.com
Your Document Collaboration APIs
Follow us on LinkedIn, Twitter, Facebook and Google+