Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Learn more about Collectives

Teams

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Learn more about Teams

I have this code in a PDF generation method:

Dim license As license = New license
License.SetLicense(Path.Combine(Request.PhysicalApplicationPath, "bin", "Aspose.Pdf.lic"))

I also tried simply:

Dim license As license = New license
License.SetLicense("Aspose.Pdf.lic")

I verified that the license file exists at the above path, but I still get this error:

Cannot find license 'C:\Users\MyUsername\source\repos\MyApp\Src\MyProject\bin\Aspose.Pdf.lic'.

If the license file is there (and it does appear to be a legitimate XML file, not just a placeholder), why is it not being found?

Thanks for contributing an answer to Stack Overflow!

  • Please be sure to answer the question. Provide details and share your research!

But avoid

  • Asking for help, clarification, or responding to other answers.
  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.