Friday, May 10, 2013

Steps to consume Aspose Cells license in Code

Recently, I got the chance to use Aspose.Cells in one of my project. Once, you have procured the Product license key which is typically in a .txt file, you can register the license in 4 simple steps:

  1. Get rid of any reference to the evaluation period version of the DLL (if used) from your solution
  2. Add a folder in the VS2010 Solution and just add a folder and place the required license file (Aspose.Cells.Lic)
  3. Make the client license as a part of the VS2010 solution by going to the license property in Visual Studio and choosing In the Properties dialog box, locate the Build Action property. By default, this property is set to Content. Click the property and change the Build Action property to Embedded Resource
  4. Before starting the use of the available tool in the visual studio webpart, you need to write the below code atleast once in the code and refer to the correct DLL. 
  5. This method can be called on the Page_Load of the Visual Webpart code behind (.cs) file. For more details, use the below mentioned URL to the Aspose team: 
  6. http://www.aspose.com/docs/display/cellsnet/Licensing
  7. //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");
    
    



No comments:

LinkWithin

Related Posts with Thumbnails