Temp Licence is not valid

I have received temporary licence file via email. However when I am trying to Set Licence

License license = new();
license.SetLicense("Aspose.Words.NET.lic");

I am getting following exception:

Invalid license signature. Please make sure the license file was not modified

Could you please advice on why it might be not valid?

@usernamename The problem might occur because the license file has been modified. Please redownload the license file and try using it without modifications.

@alexey.noskov I have just downloaded it from email I received and copied to different location. I have not modified licence file directly. Is it possible copying of a file could cause it? I assume not, but I can not see how it could be modified another way.

I can not re-download it as I have tried couple of other Aspose products and reached my trial licence limit.

@alexey.noskov I have re-issued new licence and downloaded it from email attachment.
I have not copied it to different location and have not applied any other changes, but still getting same issue. Below is a code example of how I have tried to do it for the second time.
Could there be any other reason why I am getting this issue, could you please advice.

License license = new();
MemoryStream stream = new(File.ReadAllBytes(@"C:\Users\maxim.matveev\Downloads\Aspose.Words.NET.lic"));
license.SetLicense(stream);

@usernamename Could you please attach your temporary license here for testing? I will check the issue and provide you more information.

@alexey.noskov I am attaching licence issued today. Hope it is ok to share this information here. :slight_smile: Thanks for your support on this issue.

@usernamename The license file works fine on my side. Here is a simple code I used for testing:

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

DocumentBuilder builder = new DocumentBuilder();
builder.Write("This is a test document.");
builder.Document.Save(@"C:\Temp\out.docx");
1 Like

Yes, you are right, it is working. Sorry, my bad, it was a mistake on my side, as I accidentally used different Licence object. I have re-tested it on my side and got positive result.
Thank you for you help! Apologise for confusion. :slight_smile:

1 Like