SetLicense

What is the best way to use SetLicense in a windows service?

When the service is started, he schedules via Thread.Start different tasks.

One of those taks is to create emails.

Right now the SetLicense is used directly in this task, so each time when the task is called.

Is there a better way to use SetLicense, for example only once in the scheduler?

Thanks

Eric

Hi Eric,


Thank you for using Aspose.Email.

Setting the license should be the very first call in your application before the API is addressed. What I have understood from your statements is that your application is creating different threads one of which uses Aspose.Email as well. I think the license can be set before any tasks are scheduled. This will enable the license call for subsequent thread calls where API is referenced. I would request you to provide us some sample application where we can test it at our end if this doesn’t meet your requirements.