We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Setting license for Aspose.Total

What is the proper way to set Total license? Should I call every part I need, say it

    Aspose.Words.License license = new Aspose.Words.License();
    license.SetLicense(stream);

    Aspose.Cells.License license2 = new Aspose.Cells.License();
    stream.Seek(0);
    license2.SetLicense(stream);

    Aspose.Slides.License license3 = new Aspose.Slides.License();
    stream.Seek(0);
    license3.SetLicense(stream);

@YuriGubanov,
Yes, you can set the license for multiple products in this way with an additional parameter which is required in Seek function i.e. SeekOrigin.Begin as demonstrated below:

Stream stream = File.OpenRead(@"Aspose.Total.Product.Family.lic");

Aspose.Words.License license = new Aspose.Words.License();
license.SetLicense(stream);

Aspose.Cells.License license2 = new Aspose.Cells.License();
stream.Seek(0,SeekOrigin.Begin);
//OR
//stream.Position = 0;
license2.SetLicense(stream);

Aspose.Slides.License license3 = new Aspose.Slides.License();
stream.Seek(0,SeekOrigin.Begin);
license3.SetLicense(stream);

Right, I omitted SeekOrigin for brevity. Anyway, it would be nice in the future to have a single point of licensing.