Trouble Setting up in c# ASP.NET mvc


#1

For some reason in my Global.aspx.cs I try to add the Viewer.InitRoutes(); in Application_start() like the guide says, but even though I have the dll (Assembly Refrence) that I installed from the NuGet Package Manager it’s still giving me an error saying that “Viewer” isn’t an object. Am I following the guide wrong or am I just missing a step. A reply whenever available would be much appreciated.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Optimization;
using System.Web.Routing;
using GroupDocs.Viewer.Converter.Options;
using GroupDocs.Viewer.Domain;
using GroupDocs.Viewer.Domain.Html;
using GroupDocs.Viewer.Handler;

protected void Application_Start()
{
Viewer.InitRoutes();
Viewer.SetLicensePath(Server.MapPath(@"~/GroupDocs.Viewer.for.NET.lic"));
ViewerHandler.SetRootStoragePath("~/App_Data");
AreaRegistration.RegisterAllAreas();
FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
RouteConfig.RegisterRoutes(RouteTable.Routes);
BundleConfig.RegisterBundles(BundleTable.Bundles);
}


#2

@adammadet,

Thanks for taking interest in GroupDocs.Viewer. It seems that you are integrating the next generation GroupDocs.Viewer for .NET API (starting from v3.0.0) with the source code of legacy API which is not supported anymore. Please download the latest ASP.NET MVC front-end application that is compatible with the next generation API from here. We would also recommend you to please visit the API documentation to understand the working of GroupDocs.Viewer. In case you would face any issue, please feel free to contact us again.