EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Mono + XMLBlackBox TElXMLSigner.GenerateSignature fails

Also by EldoS: Solid File System
A virtual file system that offers a feature-rich storage for application documents and data with built-in compression and encryption.
Posted: 12/09/2014 18:36:54
by Uros Gaber (Standard support level)
Joined: 12/09/2014
Posts: 3


I've found this class collection which works great for signing XML documents and am trying to use it on my Mono installation - which is said to be supported, but when I invoke the GenerateSignature an exception is raised that advapi32.dll is not found.

Is there a workaround?


Re, Uros
Posted: 12/09/2014 20:05:57
by Uros Gaber (Standard support level)
Joined: 12/09/2014
Posts: 3

I figure the problem is that the class tries to use Win32 Crypto provider.

I tried to add
at start of application but there's no change.

Some more details:
An error has occurred. advapi32.dll System.DllNotFoundException
at (wrapper managed-to-native) SBWinCrypt.__Global.CryptAcquireContext (intptr&,string,string,uint,uint) <0x000bf>
at SBCryptoProvWin32.TElWin32ProviderInfo.AcquireProvider () <0x00073>
at SBCryptoProvWin32.TElWin32ProviderInfo.Init (int,string,bool,bool) <0x00083>
at SBCryptoProvWin32.TElWin32CryptoProvider.AddProviderInfo (intptr,string,bool) <0x00077>
at (wrapper remoting-invoke-with-check) SBCryptoProvWin32.TElWin32CryptoProvider.AddProviderInfo (intptr,string,bool) <0x00087>
at SBCryptoProvWin32.TElWin32CryptoProvider.RefreshProviderInfos () <0x0008f>
at (wrapper remoting-invoke-with-check) SBCryptoProvWin32.TElWin32CryptoProvider.RefreshProviderInfos () <0x00053>
at SBCryptoProvWin32.TElWin32CryptoProvider.Init () <0x002bb>
at SBCryptoProv.TElCustomCryptoProvider..ctor () <0x000cf>
at SBCryptoProv.TElBlackboxCryptoProvider..ctor () <0x0000f>
at SBCryptoProv.TElExternalCryptoProvider..ctor () <0x0000f>
at SBCryptoProvWin32.TElWin32CryptoProvider..ctor () <0x0000f>
at (wrapper remoting-invoke-with-check) SBCryptoProvWin32.TElWin32CryptoProvider..ctor () <0x0002f>
at SBCryptoProvWin32.__Global.Win32CryptoProvider () <0x00043>
at SBCryptoProvManager.TElBuiltInCryptoProviderManager.Init () <0x0002f>
at SBCryptoProv.TElCustomCryptoProviderManager..ctor () <0x0011a>
at SBCryptoProvManager.TElBuiltInCryptoProviderManager..ctor () <0x0000f>
at (wrapper remoting-invoke-with-check) SBCryptoProvManager.TElBuiltInCryptoProviderManager..ctor () <0x0002f>
at SBCryptoProvManager.__Global.DefaultCryptoProviderManager () <0x0003b>
at SBCryptoProvDefault.__Global.SetDefaultCryptoProviderType (SBCryptoProv.TElCustomCryptoProvider/MetaClass) <0x0000f>
at SBCryptoProv.TElCustomCryptoProvider/MetaClass.DoSetAsDefault (SBCryptoProv.TElCustomCryptoProvider/MetaClass) <0x00013>
at SBCryptoProvBuiltIn.TElBuiltInCryptoProvider/MetaClass.SetAsDefault () <0x00020>
at SBCryptoProvBuiltIn.TElBuiltInCryptoProvider.SetAsDefault () <0x00021>
at MvcApplication2.Controllers.ValuesController.Get () <0x0002f>
at (wrapper dynamic-method) object.lambda_method (System.Runtime.CompilerServices.Closure,object,object[]) <0x0004c>
at System.Web.Http.Controllers.ReflectedHttpActionDescriptor/ActionExecutor/<>c__DisplayClass13.<GetExecutor>b__c (object,object[]) <0x00039>
at System.Web.Http.Controllers.ReflectedHttpActionDescriptor/ActionExecutor.Execute (object,object[]) <0x0002d>
at System.Web.Http.Controllers.ReflectedHttpActionDescriptor/<>c__DisplayClass5.<ExecuteAsync>b__4 () <0x00053>
at System.Threading.Tasks.TaskHelpers.RunSynchronously<object> (System.Func`1<System.Threading.Tasks.Task`1<object>>,System.Threading.CancellationToken) <0x0005b>
Posted: 12/09/2014 23:46:49
by Eugene Mayevski (Team)

You seem to be using wrong assembly set. There's a separate set of assemblies for Mono which are not installed by default by the installer. You must select the corresponding option in installer, then reference proper assemblies in Assemblies\Mono_20 folder, and ensure that they are loaded when your application is run.

Sincerely yours
Eugene Mayevski
Posted: 12/10/2014 20:34:02
by Uros Gaber (Standard support level)
Joined: 12/09/2014
Posts: 3

Yes, this solved the problem.

Thank you!



Topic viewed 663 times

Number of guests: 1, registered members: 0, in total hidden: 0


Back to top

As of July 15, 2016 EldoS business operates as a division of /n software, inc. For more information, please read the announcement.

Got it!