Reputation: 1
I am trying to write a Dynamics 365 plugin using Aspose.Barcode, however, every time I try to set the license or extract a barcode the library throws a System.IO.EndOfStreamException "Attempted to read past the end of the stream" exception.
For example I have the following lines of code in the application to set the licence:
string license = GetAsposeLicense();
byte[] byteArray = Encoding.ASCII.GetBytes(license);
using (MemoryStream stream = new MemoryStream(byteArray))
{
License barCodeLicense = new License();
barCodeLicense.SetLicense(stream);
}
The funny thing is the same lines of code work perfectly fine when used in a Console application; both written in dotnet Framework 4.5.2. I am using ILMerge to merge all the assemblies into one Dynamics 365 plugin library.
I guess my questions are:
Upvotes: 0
Views: 122
Reputation: 15138
Upvotes: 0