I am trying to apply a 30 day trial license to the PDF Editor Sample Project. I have followed the instructions via Aspose licensing help and it does not recognize the license. Here is where I am putting the code.
namespace AsposePdfEditor
{
public partial class Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
License license = new License();
// Set license
license.SetLicense("Aspose.Pdf.lic");
}
}
}
I have the license in the same folder as the Aspose.Pdf.dll as the instructions stated
@matworsh
Thank you for contacting support.
Please try setting the license path explicitly, as in the code below:
license.SetLicense(@"D:\Licenses\Aspose.Pdf.lic");
Moreover, you do not necessarily need to set license on Page_Load event of your application because page can be loaded more than once in same application. The license only needs to be set once per application. So, while working with a web application, you can call SetLicense from Global.asax.cs/Global.asax.vb file in Application_Start protected method.
In case the problem persists, please share a sample project reproducing this issue; along with your license file by following the instructions written over this link, so that we may investigate further to help you out.