Root element missing on license file

I went to ASPOSE forum here:

And saw that the proper way to invoke the license was like this:

Dim license As Aspose.Words.License = New Aspose.Words.License
license.SetLicense("C:\Aspose.Words.lic")

When I execute this, I get an XML Exception
“Root element is missing.”

How can i fix?


This message was posted using Aspose.Live 2 Forum

Hello!

Thank you for your inquiry.

From this error, your license file seems to be corrupted. Please attach it to this thread. (Only you and Aspose staff members will be able to download it.) We’ll check the license file and provide more information.

Regards,

See attached file

Hi

Thanks for additional information. I check your license on my side and it works fine. I used the same code as you.

License lic = new License();
lic.SetLicense(@"C:\Aspose.Words.lic");

The easiest way to set a license is to put the license file in the same folder as Aspose.Words.dll and specify just the file name without path. Please see the following link for more information.

Best regards.

Excuse me for interfering but I found that the best way to handle the license is to embed it. See this other thread to view how to do it: How to embed license file in an assembly

My developer tried the approach recommened and it did not work. The alternative way recommended also did not work. (The link to the embedded resource discussion might apply to building an executable, I don’t have the right-click menu to “Properties” that they describe).

We are building a Website in VS 2005 and I need a sample of how to deploy the license file. The reason we suspected the license file is corrupt is because we get a “Root element missing” error which seems to indicate the XML in the license file is not correct.

What can we do now?

Hi

Thanks for your request. As I told you earlier your license works properly on my side. Could you please create simple application that will allow me to reproduce the issue and attach it here? I will investigate this problem and provide you more information.

Best regards.

Thanks for your help. Test app attached.

Hi

Thanks for additional information. Your test application works fine on my side. But license you attached in this application is empty text file. So please check your license.

The license file you attached in your earlier post works fine.

Best regards.