My Application_Start below:
protected void Application_Start()
{
Viewer.InitRoutes();
Viewer.SetLicensePath(Server.MapPath(@"~/GroupDocs.Viewer.for.NET.lic"));
Viewer.SetRootStoragePath(Path.GetTempPath());
Viewer.EnableFileListRequestHandling(true);
WebApiConfig.Register(GlobalConfiguration.Configuration);
AreaRegistration.RegisterAllAreas();
FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
RouteConfig.RegisterRoutes(RouteTable.Routes);
BundleConfig.RegisterBundles(BundleTable.Bundles);
var webformVE = ViewEngines.Engines.OfType().FirstOrDefault();
ViewEngines.Engines.Remove(webformVE);
try
{
SAMLConfiguration.Load();
}
catch (Exception ex)
{
string s = ex.Message;
}
Database.SetInitializer(null);
}
I am setting root storage to the temp folder which makes sense for the application, the files are there, GroupDocs.Viewer control show up, download works, print works, /document-viewer/ViewDocument comes back successful and returns number of pages and all the information, then /document-viewer/GetDocumentPageImage (for both Excel pages) come back fine and the result show the pages from my Excel document, but the control keeps telling me that it is rendering. There are no JS errors in the console. Basedon this, it doesn't look like it's not finding my files (JPG or Excel).
My view is as simple as it can get. I mean if you have a simple sample for MVC (aside for the one from the site that doesn't compile), I would appreciate if you could share it with me, I am trying to do the simplest thing possible, just render some simple documents.
For completion, my view is this:
@using Groupdocs.Web.UI
@{
Layout = null;
}
OfflineViewer
body {
margin: 0;
padding: 0;
}
body div {
width: 100%;
height: 100%;
}
@Html.CreateViewerScriptLoadBlock()
@(Html.ViewerClientCode()
.TargetElementSelector("#OfflineViewer")
.ShowFolderBrowser(false)
.ShowSearch(false)
.ShowThumbnails(false)
.SupportListOfContentControls(false)
.SupportPageReordering(false)
.SupportPageRotation(false)
.SupportTextSelection(false)
.UsePdfPrinting(true)
.UseHtmlBasedEngine(false, true, false, true)
.FilePath(ViewData["fileName"].ToString())
.ZoomToFitWidth())