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

Free Support Forum - aspose.com

License is lost when running web application on a webfarm


We are using ASPOSE.TOTAL and we have a very annoying problem.

We run our webapplication that uses Aspose.total on a webfarm with 6 servers. The license get's set in the Application_Start (which was recommended by Aspose). The code is posted below. Now it runs fine for a while and then alle off a sudden we see the evaluation messages in our documents and it seems that the license is lost.

It's a real pain in the butt because everytime we have to reset the webapplication and the application has 15.000 users who get kicked off the application when we have to reset the application. We would like a proper solution because it's really bugging us and we get a lot of complaints about this.

protected void Application_Start(object sender, EventArgs e)


string licenseFile = Server.MapPath("./bin") + "\\Aspose.Total.lic";

if (System.IO.File.Exists(licenseFile))


Aspose.Words.License licenseWord = new Aspose.Words.License();


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


Aspose.Pdf.License licensePDF = new Aspose.Pdf.License();




Best Regards



<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thanks for your request. It is really strange issue. Does the problem occur only with Aspose.Words or with other components too (as I can see you also use Aspose.Cells and Aspose.Pdf)?

As a possible solution, you can set license in the static constructor of the class where you use Aspose.Words.

Another possible solution is setting the license on Page_Load, but it is not very good.

Best regards,

Hi Alexy,

When the license is lost it looses it for all items (Words, Excel, PDF). Isn't there anther solution, maybe you can give us a DLL that doesn't need a license file or integrate the license in the DLL?

The application we use it in is a really big one and it's used throughout the entire application. So going through all items to set the license manually will be a pain and will be time consuming.

Best Regards,


Hi Patrick,

<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thanks for your request. You do not actually change every class where you use Aspose.Words. For example in case of applying the license on Page_Load, you can apply license only on Page_Load of login page, or other page which starts first when user open your site.

Best regards.