Aspose.Cells for .NET License not working

Hi,

We are currently using Aspose.Cells for .NET purchased in 6/28/2016 with Developer Small Business license. We used Aspose.Cells API in a Windows Service that is working fine. Now, we wanted to use the Aspose.Cells API on the same machine in an another Windows Service application. We have tried to use the same license but the evaluation version is appearing. Please let us know if we can use the license since both Windows Services are deployed on same machine? A prompt reply will be appreciated!

Thanks,
Azim

@buy.iengineering

We cannot answer your deployment related questions as it is (Aspose.Cells forum) a technical queries forum. You should ask such a question in Aspose.Purchase forum.

Technically speaking, your license file is an xml file. If you open your license file in Notepad++ or FireFox, you will find, it is an xml file.

The information in the xml file can be loaded directly from the file or it can be loaded or saved in byte[] and then you can set the license in both ways.

In order to set the license, there is a License class in Aspose.Cells namespace. The License class is found in many other libraries as well but all have different namespaces. e.g.

Aspose.Cells.License
Aspose.Slides.License
Aspose.Words.License
etc.

It means, you will set license using the correct License class. In case of Aspose.Cells, you will set license like this.

Given that your license file name is MyLicense.lic and it is placed in C:\TempUs, then full path of license file will be C:\TempUs\MyLicense.lic.

And you will set license like this

//Setting Aspose.Cells license
Aspose.Cells.License cellsLicense = new Aspose.Cells.License();
cellsLicense.SetLicense(@"C:\TempUs\MyLicense.lic");

For other APIs, like Aspose.Slides, the code will be like this

//Setting Aspose.Slides license
Aspose.Slides.License slidesLicense = new Aspose.Slides.License();
slidesLicense.SetLicense(@"C:\TempUs\MyLicense.lic");

License needs to be set only once before you use any Aspose.Cells APIs. If you have one process and it has multiple threads like 2, 3, 4 etc. you do not need to set license for those threads. It means, License needs to be set once for process. It is a process-wise thing not a thread-wise thing.


Reference Article Link: