Free Support Forum - aspose.com

Aspose.Total license problem with Aspose.Slides

Hello,

We have Aspose.Total license. Pdf, Cells and Words works fine. The problem is that we can’t seem to pass the license file for Aspose.Slides (v 6.1.0.0).

Our code (If we comment Slides out it works fine):

License wordsLicense = new License();

wordsLicense.SetLicense("Aspose/Aspose.Total.lic");

Aspose.Pdf.License pdfLicense = new Aspose.Pdf.License();

pdfLicense.SetLicense("Aspose/Aspose.Total.lic");

Aspose.Cells.License excelLicense = new Aspose.Cells.License();

excelLicense.SetLicense("Aspose/Aspose.Total.lic");

Aspose.Pdf.Kit.License pdfKitLicense = new Aspose.Pdf.Kit.License();

pdfKitLicense.SetLicense("Aspose/Aspose.Total.lic");

Aspose.Imaging.License imagingLicense = new Aspose.Imaging.License();

imagingLicense.SetLicense("Aspose/Aspose.Total.lic");

Aspose.Slides.License slidesLicense = new Aspose.Slides.License();

slidesLicense.SetLicense("Aspose/Aspose.Total.lic");

Our exception:

License "Aspose/Aspose.Total.lic" doesn't exist or access is restricted.
License "{path}\bin\Aspose.Total.lic" doesn't exist in the executing assembly's directory.
License "{path}\bin\Aspose.Total.lic" doesn't exist in the calling assembly's directory.
License "Aspose.Total.lic" doesn't exist in calling assembly's resources.
Cannot find license "Aspose/Aspose.Total.lic".

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.IO.FileNotFoundException: License "Aspose/Aspose.Total.lic" doesn't exist or access is restricted.
License "{path}\bin\Aspose.Total.lic" doesn't exist in the executing assembly's directory.
License "{path} \bin\Aspose.Total.lic" doesn't exist in the calling assembly's directory.
License "Aspose.Total.lic" doesn't exist in calling assembly's resources.
Cannot find license "Aspose/Aspose.Total.lic".

Source Error:

Line 81:

Line 82: Aspose.Slides.License slidesLicense = new Aspose.Slides.License();

Line 83: slidesLicense.SetLicense("Aspose/Aspose.Total.lic");

Line 84:

Line 85: // clear cache


Source File: {path}\Global.asax.cs Line: 83

Stack Trace:

[FileNotFoundException: License "Aspose/Aspose.Total.lic" doesn't exist or access is restricted.

License "{path}\bin\Aspose.Total.lic" doesn't exist in the executing assembly's directory.

License "{path}\bin\Aspose.Total.lic" doesn't exist in the calling assembly's directory.

License "Aspose.Total.lic" doesn't exist in calling assembly's resources.

Cannot find license "Aspose/Aspose.Total.lic".]

..[1](String licenseName, Assembly callingAssembly) +1167

..[1](String licenseName, Assembly clientAssembly) +303

DMSPortal.Web.MvcApplication.Application_Start() in {path}\Global.asax.cs:83

[HttpException (0x80004005): License "Aspose/Aspose.Total.lic" doesn't exist or access is restricted.

License "{path}\bin\Aspose.Total.lic" doesn't exist in the executing assembly's directory.

License "{path}\bin\Aspose.Total.lic" doesn't exist in the calling assembly's directory.

License "Aspose.Total.lic" doesn't exist in calling assembly's resources.

Cannot find license "Aspose/Aspose.Total.lic".]

System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext context, HttpApplication app) +12863325

System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +175

System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +304

System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +404

System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +475

[HttpException (0x80004005): License "Aspose/Aspose.Total.lic" doesn't exist or access is restricted.

License "{path}\bin\Aspose.Total.lic" doesn't exist in the executing assembly's directory.

License "{path}\bin\Aspose.Total.lic" doesn't exist in the calling assembly's directory.

License "Aspose.Total.lic" doesn't exist in calling assembly's resources.

Cannot find license "Aspose/Aspose.Total.lic".]

System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +12880068

System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +159

System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +12721257

Hi,


Thanks for inquiring Aspose.Slides.

I have observed the stack trace shared by you. Can you please share the license file with us by following the guidelines shared here. I will investigate the issue further on my end to help you out.

Many Thanks,

I have sent you the license. Do you see the problem?

Hi,


I have tested the license file shared with Aspose.Slides for .NET 6.1.0 on my end and have not been able to reproduce the issue. For your kind reference, I have attached the sample application that worked on my end. Please share, if I may help you further in this regard.

Many Thanks,

Hi,


Actually your project gave me an idea that solved the problem. Apparently Aspose.Slides.License skipped the Aspose/Aspose.Total.lic part, and it was looking for license not in the Aspose folder but in root folder instead.

So instead of
slidesLicense.SetLicense(“Aspose/Aspose.Total.lic”);

it was looking in this
slidesLicense.SetLicense(“Aspose.Total.lic”);

Strange is that pdf, word and cells work fine. Came up with a solution by just getting the absolute path:

string licenseFilePath = HttpContext.Current.Server.MapPath("~/Aspose/Aspose.Total.lic");
slidesLicense.SetLicense(licenseFilePath);

Thanks for your quick response.

Hi,


That is appreciable that issue has got resolved on your end. Please share, if I may help you further in this regard.

Many Thanks,