License Not Being Detected

We have an ASP.NET web application solution that has three different projects that use Aspose. In all three projects, our Aspose.Total.lic file is an embedded resource, and we set it in the Global.asax of each project by doing the following:

Sub Application_Start(ByVal sender As Object, ByVal e As EventArgs)

Dim licenseFilename As String = “Aspose.Total.lic”
Dim licenseCells As Aspose.Cells.License = New Aspose.Cells.License()
licenseCells.SetLicense(licenseFilename)

End Sub


We are having no problems with two of the three projects. With one of the projects, though, all of our files have the “watermark” worksheet, and we are also receiving the following exception:

<span style=“font-size: 12pt; font-family: “Times New Roman”,“serif”;”>“You are using an
evaluation copy and have opened files exceeding limitation”

This is only happening in our Production environment. For this broken project, we are having no problems at all in our Pre-Production environment. All of the files (dll’s, the license, etc.) were simply copied and pasted from the functioning Pre-Production environment to the broken Production environment.

Also, this was working without a problem for several months. It just started happening recently even though we have not changed the license file, how the license is loaded, or anything else with the license file.

We have verified that the path to the license is correct and that the license & all the versions of Aspose.Cells.dll are the same among all the different projects and environments.

What could be causing the license to not be successfully registered?

Hi,

It looks strange as you are finding licensing problem in only one environment whereas no problems with other two project as you have described. Please make sure that you are using the valid and similar license file (which other two projects are using, here you should be careful that you or somebody else should not edit/modify the license file) with the same Aspose.Cells.dll library in your production server. Could you try to check your license subscription expiry (you may simply open the lic file into notepad and check the expiry date). It is also quite possible that in production server, now, you might be using a version (Aspose.Cells.dll) which is released after your license subscription expiry so you are getting evaluation watermark worksheet.

Alternatively, I think you can also try to set the license file with explicit path at production server environment instead of setting it as an embedded resource.

Thank you.

The license does not expire until May, 2009. The license file and dll’s (versioin 4.5.0.3) are identical across all of the projects and all of the environments. We checked the licenses using Reflector to get at the dll’s resources.

We can try setting an explicit path to the license, but this is less than ideal since it will require a rollout to production, which is not an easy process, and is untestable since it only happens in production.

Any other possibilities?

Thanks.

Hi,

After checking your issue more closely, we think the production environment never triggers the Application_Start event of Global.asax. So, could you try to restart the service i.e.., "World Wide Web Publishing"? then, try to trace whether Application_Start event is triggered when you first visit your project.

Thank you.

Thank you! That was the problem. I accidentally omitted part of the Applicaiton_Start that was calling an NHibernate setup method, which was throwing an exception and causing the license registration to be skipped.