Follow these simple rules:
- The license only needs to be set once per application domain.
- You need to set the license before instantiating any other Aspose.Editor classes.
Calling SetLicense multiple time is not harmful, but simply wastes processor time.
If you are developing a Windows Forms application, call SetLicense in some of your startup code, before using Aspose.Editor.Desktop classes.
When developing an ASP.NET application, you can call SetLicense from the Global.asax.cs (Global.asax.vb) file, in the Application_Start protected method. It is called once when the application starts. Do not call SetLicense from within Page_Load methods since it means the license will be loaded every time a web page is loaded.
If you are developing a class library, you can call SetLicense from a static constructor of your class that uses Aspose.Editor. The static constructor will execute before an instance of your class is created making sure Aspose.Editor license is properly set.