Hi
I am developing web site using VS2012,with GlobalDoc .net2.1.2 version,i got temporary license yesterday only (05-08-14).after i include in Global.asax file using below line,i get True in result variable and can. view more than 10 files and more than 2 pages
Groupdocs.Web.UI.Viewer.SetLicensePath(Server.MapPath("~/GroupDocs.Viewer.for.NET.lic"))<o:p></o:p>
Dim
result As Boolean =
Groupdocs.Web.UI.Viewer.IsLicensed
But after publish and deploy in server machine .license file not work.i.e.still water mark,can't view 2 pages and can't view 10 files.
When i chat with support team,ask me change full path for license like
Groupdocs.Web.UI.Viewer.SetLicensePath("C:\inetpub\wwwroot\webftG/GroupDocs.Viewer.for.NET.lic"))
But i got error,like cant give physical path ,only need to virtual path,see the screenshot below link
http://prntscr.com/4a13kg
Note:In developing machine license file work,after publish and deploy in server it not work.i.e water mark and other restrictions are came back.
Pls reply asap
Regards
Aravind
Hello Aravind,
We are sorry to hear that you have such issue.
You need to check if license file (*.lic) is available on the server. If it is absent - GroupDocs.Viewer will be working in trial mode.
Please paste the next code (C#) to the “Application_Start” method of the Global.asax:
String full_path = Server.MapPath(“SEEK_GroupDocsViewer.lic”);
System.IO.FileInfo fi = new System.IO.FileInfo(full_path);
if (fi.Exists == false)
{
throw new Exception(“License file '”+full_path+"’ is absent");
}
Groupdocs.Web.UI.Viewer.SetLicensePath(full_path);
Boolean is_valid = Groupdocs.Web.UI.Viewer.IsLicensed;
if (is_valid == false)
{
throw new Exception(“License is corrupted, expired or invalid”);
}
If there will be no exception - all is good.
If you will have more questions please feel free to contact us.