Order Id: 171020092810 - Best practice of having Aspose License code in Web service

Hi,

I am using Aspose dll in a webservice. I have placed License file and aspose word dll in Project’s Bin folder (Same path). Even after using having below code in application_start() or in Class’s constructor method, I am getting result of evolution version (Label in red color on top of converted PDF). Please let me know the best practice of having Aspose License code in Web service.

Aspose.Words.License license = new Aspose.Words.License();
license.SetLicense(“Aspose.Words.lic”);

Thanks.

@sanath,

Thanks for your inquiry. Please refer to the following article.
Applying a License

Please use License.IsLicensed property to check either license is set or not. This property returns true if a valid license has been applied; false if the component is running in evaluation mode.

@tahir.manzoor

Thank you for the update. I have already referred the link that is provided. However I am looking for best practice to SetLicense in a webservice. Which event of the webservice can the license be set?

Thanks,

@sanath,

The license only needs to be set once per application domain. You need to set the license before using any other Aspose.Words classes. You can put the license file in Bin directory and call the License.SetLicense method in the constructor of service.

Aspose.Words.License lic = new Aspose.Words.License();
lic.SetLicense(@"Aspose.Words.lic");