SetLicense return memory problem

Hi,

I am having problem setting license.
Can Aspose staff please help?
Currently the license is evaluation one.

my code:

string asposeLicFile = Path.Combine(Path.GetDirectoryName(Application.ExecutablePath), "Aspose.Total.lic");
if (System.IO.File.Exists(asposeLicFile))
{
    Aspose.Words.License license = new Aspose.Words.License();
    license.SetLicense(asposeLicFile);
}

The bold blue color code got this problem below with my server (Win 2008 Server).

System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

Note that, I am running my program as window service.

Thanks,
luke

Hi
Thanks for your request. Which version of Aspose.Words do you use? To check version of the library, right click on the dll, select Properties from the context menu, then select Version tab. You will see File version.
Best regards,

Hi,

Aspose.Words
File Version = 8.0.0.0
Product version = 2009.11.12.0
Date modified = 11/12/2009 10:55 PM

Thanks,
luke

Hi

Thanks for your inquiry. I cannot reproduce the problem using the latest version of Aspose.Words (8.0.0). I used for testing Windows 2008 Server x64. Could you please try setting the license in simple console application? Will this produce the same problem?
Best regards,

Hi, I have no problem running the window service with Aspose.Words in WinXP.

Ok, I will try simple console application tomorrow.

Hi

Thank you for additional information. I will wait for your inputs.
Best regards.

Hi,

I have error setting license in windows form as the license already expired.

This could be the cause for my window service in WinServer 2008?

Will request to extend my temporary license and try again;

and update you.

Thanks!

Hi,

I have managed to run my window service, with Aspose, without setting license.

Currently trying to extend my temporary license;

and will test again later once I got new temporary license.

Will update you too.

Thanks!

Hi

Thank you for additional information. I hope updating the license will help you to get rid this problem. Keep me updated.
Best regards.

Hi Andrey,

After getting a new license for Words and Report;

I still encountered the same error when running the SetLicense code.
Same error occurred with a simple window form application.

Can you please check and help?

Thank you.

Note that there is no problem running the SetLicense in Win XP.
And the Win 2008 Server is running in VM (Virtual Machine).

luke

Hi Luke,

Thank you for additional information. Unfortunately, I do not have Win 2008 installed on hardware machine. I tested this on virtual machine. Maybe that is why I did not reproduce the problem.
I will try to check this on hardware machine, but this can take some time.
Best regards.

Andrey, my Win Server 2008 is also running in Virtual Machine.

I have the problem; and now I am stuck;

Please check with your colleagues worldwide regarding this;

and get back as soon as possible.

Thanks,
luke

Hi

Thanks for your request. I created a simple console application with the following code:

using System;
using System.Collections.Generic;
using System.Text;
using Aspose.Words;
namespace TestLicense
{
    class Program
    {
        static void Main(string[] args)
        {
            try
            {
                // Set license.
                License lic = new License();
                lic.SetLicense("Aspose.Words.lic");
                // Create simple document.
                DocumentBuilder builder = new DocumentBuilder();
                builder.Write("This is simple test document");
                builder.Document.Save("out.doc");
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.StackTrace);
            }
        }
    }
}

This application works without any issues on Win 2008 64bit, which is installed on Virtual Machine. What exception is thrown on your side?
Best regards.

Hi,

I have no problem with your code in my Win Server 2008.

I have also changed my code to the same as yours;

that is in the SetLicense just the “Aspose.Words.lic” instead of full path filename.
This works fine.

However, I have the same error message when trying to set license
for Aspose.Report

Here is my code:

Aspose.Report.License licRpt = new Aspose.Report.License();
licRpt.SetLicense("Aspose.Report.lic");

Got error on the red bold code.

Aspose.Report.dll
Assembly Version is 1.3.0.0
Product Version is 2009.09.17

Please try at your side.

Thanks!

Hi Luke,

Thank you for additional information. It is perfect that you resolved the problem with license. Aspose.Words and Aspose.Report are different products, so you should contact Aspose.Report support in the appropriate forum in order to resolve the problem with its license.
As you know, you can also apply license from Stream. Maybe in your case, this can help you to fix the problem. Also you can include the license as embedded resource into your project, as described here:
https://docs.aspose.com/words/net/licensing/
Hope this helps.
Best regards.

Ok thanks.

Will post on Aspose.Report site.

Cheers!