Where to place LIC file?


#1

I placed the .lic file that I received after purchase in the same directory as the .DLL, but it still acts as if it’s not licensed: it adds that extra worksheet called “License Info”.

I tried using the License class as mentioned in the documentation:

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

But the License() constructor isn’t accessible from my code.

Any ideas?

;ted


#2

I tested it in my machine and all worked fine.

Do you place the license file in the same directory as your program? Is the name of your license file “Aspose.Excel.Web.lic”?

To avoid confusion, you can specifiy the path of the license file. For example:

License license = new License();
license.SetLicense(“C:\LicesneFile\Aspose.Excel.Web.lic”);

Or you can include this license file in your project and build it as embedded resource.


#3

Which part of code do you call the license code? You have to call it before you program runs. Please try to put it in the Page_Load event.


#4

When I try to comple:

License license = new License();

The compiler complains that License can’t be accessed. It turns out that it was the wrong class, it was trying to instantiate the System.ComponentModel.License class instead of the Aspose.Excel.Web.License class.

Perhaps you can clarify this in the documentation?

;ted


#5

We have a FAQ wiki topic to address this issue. Please check it out at http://www.aspose.com/wiki/default.aspx/Aspose.Purchase/HowToFixLicenseClassConflict.html