Moving Aspose diagram application to a new server gets an error in SetLicense

I have had my Aspose.Diagram application on our test sever for about a month now. Today we stopped the test site and moved the application to our new production server. I am getting the below error in the site event log on the new server.

Thread information:

Thread ID: 3

Thread account name: IIS APPPOOL\API

Is impersonating: False

Stack trace: at Aspose.Diagram.License.**SetLicense**(String licenseName)

at XmlToVisio.WebApiApplication.Application_Start()

Any help on fixing this problem would be wonderful. Thanks.

Hi Blake,


Thank you for contacting support. Please let us know which Aspose.Diagram library version are you using. Did you test with the latest version? If so, then please provide us the complete details of your working environment, e.g. IIS version, OS (name and edition), .NET Framework, native language settings, Visual Studio (name and version) and any other information which helps in replicating the error message on our side. It would be great if you can prepare a sample project which produces the said error message on your side and attach its archive in this forum thread. It’ll help us to be more specific. We’ll investigate and reply you appropriately.

Hello,

Here is the information on the server:

*OS Version : Windows 2012 R2<o:p></o:p>*

*Service Pack : No Service pack*

*IIS : Version 8.5.9600.16384*

*.Net CLR version : v4.0.30319*

*Aspose Diagram for . Net ver 6.0.0.0*

*Native language setting on the server are English.*

*We used Visual Studio 2013 with C# to develop the application.*

Here is what the event viewer is saying:

*Exception information:*

*Exception type: NullReferenceException*

*Exception message: Object reference not set to an instance of an object.*

*at Aspose.Diagram.License.SetLicense(String licenseName)*

*at XmlToVisio.WebApiApplication.Application_Start()*

Also I have attached the code. The code is only an API and requires some things to be setup in order to create diagram, but you will be able to see how the license is set in the Global.asax page. Also I have ommited my license file.

Could the reason we are getting this error message be because our license is only good for 1 environment and we are trying to load it in another environment?

Hi Blake,


Thank you for giving the sample application project. We have tested your sample project by using our own Aspose license. We could not reproduce the said error message on our side. It successfully navigates to the home page after applying license on the application start event.
serranoblake:
Could the reason we are getting this error message be because our license is only good for 1 environment and we are trying to load it in another environment?
Yes, this might be the cause of this error message. Please completely remove Aspose library and license from one working environment and check if it works perfectly in the second working environment. Otherwise, please send us your license file. We’ll investigate and reply you appropriately.

You can share a license file or any other confidential information as narrated in the following help topic: How to Send License to Aspose Staff

Hello,

Yesterday I sent an email with my license that is giving us trouble. I was wondering if there was any update. Thanks.

Hi Blake,


Thank you for sending the required Aspose license file. We have incorporated your license file and executed the given application project on our side. Based on the initial investigation, it does not throw the said error message and successfully navigates to the home page. Additionally, there is no null reference exception in the event logs. We’re preparing an environment of Windows Server 2012 R2 and will get back to you with our findings in a couple of days.

Hi Blake,


In addition to the above reply, as we’re preparing a new environment, so please provide complete details e.g. Windows Server 2012 R2 Standard 64-bit (English) and Microsoft Visual Studio Professional 2013.

Hello,

I have attached an image with the details of the server. It is a 64 bit version of Windows Server 2012 r2 and a 64 bit version of Visual Studio 2013 professional using .net 4.5.
Thanks again for your help.

Hi Blake,


Thank you for the details. We’re working to build the new environment and will get back to you early next week.

Hi Blake,


Thank you for being patient. We have prepared a new virtual machine by utilizing the given information. We’re afraid that we could not imitate this error message on our side. We deployed website on the IIS server and it properly navigates to the home page. We’ve attached its screenshot for your kind reference (Screenshot.png). Have you attempted to check this problem on another computer? If not, then please reproduce this error message on another machine and share your feedback with us. It appears an environment issue on your side.

We’re looking forward to help you.

Thank you for your work. Would you be able to give me a trial license I could use for testing?

Hi Blake,


Thank you for the inquiry. You can request a 30 day temporary license from the purchase portal. Its option is available in step 4. In case, this does not work then please register a thread in the Aspose.Purchase forum.

Hello I want to confirm that the server does not need access to the internet for the license to work.

Our new server does NOT have access to the internet.

Hi Blake,


Thank you for the inquiry. The license validation part is already available in the Aspose library. It works with or without the internet connection.

Hello,

We are still having an issue with our setup. I do not think there is anything with the license as you have stated. We have spent many days troubleshooting on the server and we cannot resolve the issue. Is there anyway someone with Aspose would be able to do an online meeting and possibly a screen share to help us resolve this issue? Thanks.

We were able to solve the problem! The .net trust level needed to be set to full. Thanks again for all your help.

Hi Blake,


Thank you for the confirmation. It is nice to hear from you that the problem has been resolved. Please let us know if you require any further assistance, we will be happy to help you.