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

Free Support Forum - aspose.com

Web Application

When I am trying the setlicense() method in Global.asax--->Session.Start() method I am getting the below error in the second line given below(C#)

var license = new Aspose.Word.License();

This message was posted using Aspose.Live 2 Forum


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

Thanks for your request. Could you please be more specific regarding the problem you are observing? Could you please provide me details of the exception? Please attach stack trace of the exception.

I cannot reproduce the problem on my side using the latest version of Aspose.Words (9.3.0).

I use the following code for testing:

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


Best regards,

No, it is working fine when I am putting the code in Application_Start() in Global.aspx. But I am getting the error when I am putting the code in Session_Start() event in Global.aspx page.


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

Thank you for additional information. Please see the following link to learn where to apply the license:


When developing an ASP.NET application, you should call License.SetLicense from the Global.asax.cs (not from the Global.aspx) file, in the Application_Start protected method.

May I ask you, why do you need to call SetLicense from the Session_Start()?

Best regards,