Exception: Invalid license signature

Dear Team,

Greetings.

I have renewed Aspose license and got new license file. When I replaced the file from old one to new and I am getting below error.

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

Note: I have neither modified the file name nor opened the file.

I am using license file in c# .NET as below.

string fileLocation = @“E:\AsposeLicense\aspose.words.net-1-.lic”;
Stream licStream = new MemoryStream(File.ReadAllBytes(fileLocation));
Aspose.Words.License Lic = new Aspose.Words.License();
Lic.SetLicense(licStream);

Please help to resolve this issue.

Regards
Manish

@SehaReportsApplication ,

Please share your license file with me via private message. In order to send a private message with attachment, please click on my name and find “Message” button.

How to apply Aspose License?

I will then investigate the issue with your license file on my end and provide you more information.

Hi Awais,

Thanks for your reply,

I can not see the Message button when I click the name as you mentioned.
image.png (119.4 KB)

Regards

Hi,

Any update please?

Regards

@SehaReportsApplication,

We have updated your account’s permissions. You should now be able to see/use this private Message option.

@SehaReportsApplication,

It is to inform you that we had received your license file and your “aspose.words.net-1-.lic” file worked fine on our end when using the latest (21.1) version of Aspose.Words for .NET. We used the following simple C# code to test this license file on our end.

using Aspose.Words;
using System;

namespace AwNetTestApp_New
{
    class Program
    {
        static void Main(string[] args)
        {
            License license = new License();
            var isLicensed = false;
            try
            {
                license.SetLicense("C:\\Temp\\aspose.words.net-1-\\aspose.words.net-1-.lic");
                isLicensed = true;
            }
            catch (InvalidOperationException)
            {
                // the License.SetLicense() method will throw InvalidOperationException
                // for an invalid/wrong/expired license etc.
                isLicensed = false;
            }

            if (isLicensed)
            {
                Console.WriteLine("License is fine");

                Document doc = new Document();
                DocumentBuilder builder = new DocumentBuilder(doc);

                builder.Writeln("Hello World!!!");

                doc.Save(@"C:\Temp\output.pdf");
            }
            else
            {
                Console.WriteLine("License not applied");
            }

            Console.WriteLine("End of process... press any key");
            Console.Read();
        }
    }
}

The Subscription Expiry Date of this license indicates that it is valid until 22nd January, 2022. We have introduced many new features, enhancements and implemented many bug fixes in 21.1 version. So, we strongly recommend that you please upgrade to the latest version of Aspose.Words for .NET API.

P.S. if for any reason you still want to use old version of Aspose.Words for .NET API, then please continue to use your ‘old license file’. And use the latest license file with the latest version.

@SehaReportsApplication,

ref: [RE: Exception: Invalid license signature](https://forum.aspose.com/t/re-exception-invalid-license-signature/224697)

The problem occurs because you are using new license with a very old 14.7 version of Aspose.Words for .NET. You will not get any such exceptions when you upgrade to the latest 21.1 version of Aspose.Words for .NET.

Hi Awais,

Thanks for your support.

I replaced it with latest dll and it worked.

Regards
Manish

@SehaReportsApplication,

It is great that you were able to resolve this issue on your end. In case you have further inquiries or may need any help in future, please let us know by posting a new thread in Aspose.Words’ forum.

A post was split to a new topic: Invalid license signature while applying license