We want you to contribute!
This forum is a moderated environment.
We try to keep it neat and tidy. In order to access the forum content we would like you to either login or register.
We recently purchased a Domain license for Scryber for one of our development environments. However, I'm having some problems.
Whenever I include the license file, as per instructions, in the bin directory, I'm getting an error for when attempting to generate the PDF:
Scryber.Licensing cannot be serialized. Static types cannot be used as parameters or return types.
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.InvalidOperationException: Scryber.Licensing cannot be serialized. Static types cannot be used as parameters or return types.
I've tried doing a few things, but I'm still not quite sure if this is a problem with the license for something within my environment, since it's referencing that Scryber class.
Any ideas? I want to get this setup ASAP.
I cannot see any issues with the license file (having checked locally).
I am assuming you are using v9.0 of the scryber libraries.
Which version of the .Net framework are you using? I found this on stackoverflow from 4 years ago (probably .Net 2.0)
The identified defect is resolved certainly in v4.0 which the framework is built under.
If you can provide a stack trace it would be helpful.
There is also another thread with a licensing file issue - we resolved down to permissions on the file, and had to give both read and write permissions to the account in the app pool.
Hope this helps
It is also possible to manually set the license in code. Which should only be called once in your application / domain.
string terms = "[Value from XML]";
string signature = "[Value from XML]";
Licensing.PDFLicense lic = new Licensing.PDFLicense(terms, signature);
This will avoid the need for a license file (should b e removed from the bin directory) and not require the XML Serializer.