Free Support Forum - aspose.com

Licensing information missing

Hey, we've purchased aspose cells and need instruction to license in Visual Studio.<br>we were given the link below but it does not work. page is empty.<br>please help asap. thanks.<br><br>http://www.aspose.com/documentation/file-format-components/aspose.cells-for-.net-and-java/licensing.html<br>

Hi,

Thanks for considering Aspose.

No, the link is find and the page has the related licensing material, check the attached screenshot. Could you check your internet connection and recheck it.

Any how, I will paste some information for you here:

Setting License

The license is a plain text XML file that contains details such as the product name, number of developers it is licensed to, subscription expiry date and so on. The file is digitally signed, so don't modify the file. Even inadvertent addition of an extra line break into the file will invalidate it.

You need to set a license before utilizing Aspose.Cells if you want to avoid its evaluation limitation. It is only required to set a license once per application (or process). The license can be loaded from a file, stream or an embedded resource.

Aspose.Cells tries to find the license in the following locations:

  • Explicit path
  • The folder that contains Aspose.Cells.dll
  • The folder that contains the assembly that called Aspose.Cells.dll
  • The folder that contains the entry assembly (your .exe)
  • An embedded resource in the assembly that called Aspose.Cells.dll

There are two common methods to set the license, these are discussed below:

1st Method (Using File or Stream)

The easiest way to set a license, is to put the license file in the same folder as that of Aspose.Cells.dll and specify just the file name without its path.

For Java, the easiest way is to put the license file in the Working directory and specify just the file name.

Example:

[C#]

//Instantiate an instance of license and set the license file through its path

Aspose.Cells.License license = new Aspose.Cells.License();

license.SetLicense("Aspose.Cells.lic");

[VB.NET]

'Instantiate an instance of license and set the license file through its path

Dim license As Aspose.Cells.License = New Aspose.Cells.License()

license.SetLicense("Aspose.Cells.lic")

Note: When you call SetLicense method, the license name should be same as that of your license file name. For example, you may change the license file name to "Aspose.Cells.lic.xml". Then in your code, you should use the modified license name (that is Aspose.Cells.lic.xml) for the SetLicense method.

It is also possible to load a license from a stream.

Example:

[C#]

//Instantiate an instance of license and set the license through a stream

Aspose.Cells.License license = new Aspose.Cells.License();

license.SetLicense(myStream);

[VB.NET]

'Instantiate an instance of license and set the license through a stream

Dim license as Aspose.Cells.License = new Aspose.Cells.License()

license.SetLicense(myStream)

[JAVA]

//Instantiate an instance of license and set the license through a stream

License license = new License();

license.setLicense(myStream);

2nd Method (Using Embedded Resource)

Another neat way of packaging the license with your application and making sure it will not be lost, is to include it as an embedded resource into one of the assemblies that calls Aspose.Cells. To include the license file as an embedded resource, perform the following steps:

  • In Visual Studio .NET, include the license (.lic) file into the project using the File | Add Existing Item... menu

Add license file as Exising Item

  • Select the file in the Solution Explorer and set Build Action to Embedded Resource in the Properties window

Add license file as Exising Item

To access the license embedded in the assembly (as embedded resource), it is not needed to call GetExecutingAssembly and GetManifestResourceStream methods of System.Reflection.Assembly class of Microsoft .NET Framework. All is needed to do, is to just add the license file as an embedded resource to your project and pass the name of the license file into SetLicense method. The License class will automatically find the license file in the embedded resources.

Please review the example given below to understand this method of setting license (embedded) in your applications.

Example:

[C#]

//Instantiate the License class

Aspose.Cells.License license = new Aspose.Cells.License();

//Pass only the name of the license file embedded in the assembly

license.SetLicense("Aspose.Cells.lic");

[VB.NET]

'Instantiate the License class

Dim license As Aspose.Cells.License = New Aspose.Cells.License()

'Pass only the name of the license file embedded in the assembly

license.SetLicense("Aspose.Cells.lic")

Thank you.

Hi,

Sorry forgot to attach the screenshot of the link, here it is, you can see the page is fine.

Thank you.

that is very weird, i try the exact same url and get a blank page.
anyway, this is the info i need. thanks.

Hi,

It's so strange that you got the blank page and we find no problem at all, any how, we will check this issue. And could you check other pages in different sections of the Aspose.Cells documentation : http://www.aspose.com/documentation/file-format-components/aspose.cells-for-.net-and-java/index.html and give us your feedback if they work fine or not.

Thank you.