Spire.Barcode is a professional barcode library specially designed for .NET developers (C#, VB.NET, ASP.NET, .NET Core) and Java developers (J2SE and J2EE) to generate, read and scan 1D & 2D barcodes.

Mon Jan 18, 2016 9:11 pm

Hello,
I wrote a .NET wrapper for the BarcodeGenerator class that will return the raw bytes of a PDF417 barcode. I'm running into an issue when i call the GenerateImage() method. it's throwing a SecurityException saying "System.Security.Permissions.RegistryPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed". Is there a workaround for this? I'm assuming it's trying to validate a registration key, but i'm just trying to do a proof of concept that this will indeed work for our company. Please help.

chruska
 
Posts: 4
Joined: Mon Jan 18, 2016 9:07 pm

Tue Jan 19, 2016 1:33 am

Hi,

Thanks for your posting.
To help us reproduce and resolve the issue, please share all your code about the issue for investigation.
Thank you.

Best Regards,
Amy
E-iceblue support team
User avatar

amy.zhao
 
Posts: 2432
Joined: Wed Jun 27, 2012 8:50 am

Tue Jan 19, 2016 5:06 pm

Thank you for your quick response.

i have attached the two projects to this chain. Report 3.rdl has an Image on it in which i try to dump the raw bytes of the generated barcode into it. When it calls into the TvssrsBarcodeCreator class, it gets to the spot where it calls GenerateImage(), then throws an exception. This assembly as well as the Spire.Barcode assembly have been added into the GAC, and i have used CASPOL to elevate their trust. Please let me know if there is anything else that you need.

thank you!
You do not have the required permissions to view the files attached to this post.

chruska
 
Posts: 4
Joined: Mon Jan 18, 2016 9:07 pm

Wed Jan 20, 2016 8:23 am

Hi,

Thanks for providing.
Please also provide us the value for Data attribute you used on the two lines, settings.Data2D = data; settings.Data = data;.

Thank you.

Best Regards,
Amy
E-iceblue support team
User avatar

amy.zhao
 
Posts: 2432
Joined: Wed Jun 27, 2012 8:50 am

Wed Jan 20, 2016 2:03 pm

That's being passed in from the SSRS report. The wrapper dll that i built is working when i use a windows forms application. it's just when i call it via SSRS that i get the RegistrySecurity error. the SSRS solution that i included contains the values. i've tried a hardcoded string of "123456789", and an actual database value that is also a string, but i still receive the same error.

chruska
 
Posts: 4
Joined: Mon Jan 18, 2016 9:07 pm

Thu Jan 21, 2016 7:42 am

Hi,

Sorry that our spier.barcode.dll is supported in partial trust mode.

Best Regards,
Amy
E-iceblue support team
User avatar

amy.zhao
 
Posts: 2432
Joined: Wed Jun 27, 2012 8:50 am

Thu Jan 21, 2016 2:09 pm

Hello,
Ok, so just to clarify, what i'm attempting to do is impossible to do at this time. correct?

Thanks,

chruska
 
Posts: 4
Joined: Mon Jan 18, 2016 9:07 pm

Fri Jan 22, 2016 1:39 am

Hi,

Yes, we are so sorry for that.

Best Regards,
Amy
E-iceblue support team
User avatar

amy.zhao
 
Posts: 2432
Joined: Wed Jun 27, 2012 8:50 am

Return to Spire.BarCode