Hi,
I am trying to migrate the company application to viewer 3.0. It is an MVC .NET C# application.
I have created a very simple view just to return the document which contains:
@Html.Action(“GenerateResponse”, “Profile”);
Then in the controller I am converting the document in a simple way and send the first page, just for testing purposes:
public string GenerateResponse()
{
string documentPath = @“C:”;
string documentName = “word.doc”;
HtmlOptions options = new HtmlOptions();
ViewerConfig config = new ViewerConfig { StoragePath = documentPath, UseCache = false };
ViewerHtmlHandler handler = new ViewerHtmlHandler(config);
List htmlPages = handler.GetPages(documentName, options);
return htmlPages[0].HtmlContent;
}
This works and shows the first page but I am having trouble with the license.
In my global.asax file, in Application_Start() I have coded this:
License lic = new License();
if (!String.IsNullOrEmpty(System.Configuration.ConfigurationManager.AppSettings[“LicenseFile”]))
lic.SetLicense(System.Configuration.ConfigurationManager.AppSettings[“LicenseFile”]);
And my web.config has this:
But even with that I am getting a limit of 15 views per hour? I assume the same license I had still working in 3.0 right?
I am looking forward to hear from you.
Kind regards,