Cryptware.NCryptoki.CryptokiException

1/7/2015 12:42:27 PM
Gravatar
Total Posts 3

Cryptware.NCryptoki.CryptokiException

Hi,

 

I am getting the exception Cryptware.NCryptoki.CryptokiException: Error n. -2147467259 when I am trying to create a Cryptoki object
and attach it to the PKCS#11.

 

Cryptoki cryptoki = new Cryptoki("C:\\Program Files (x86)\\nCipher\\nfast\\toolkits\\pkcs11\\cknfast-64.dll");

 

Do you know what migt be causing this? Any help would be greatly appreciated.

 

Regards,

 


 

Sorcha

1/7/2015 12:47:41 PM
Gravatar
Total Posts 300
Ugo Chirico http://www.ugochirico.com

Re: Cryptware.NCryptoki.CryptokiException

This error appears when NCryptoki is unable to load the given PKCS#11 dll.

usually this happen when you are running a 64bit application while trying to load a 32bit PKCS#11 dll or viceversa.

or may happen when some dependency dll is missing or the access to the dll is denied.

1/7/2015 12:58:48 PM
Gravatar
Total Posts 3

Re: Cryptware.NCryptoki.CryptokiException

Thanks for that Ugo, that was the issue. I am now getting an InvalidOperationException about a message box.

 

"Showing a modal dialog box or when when the application is not running in UserInteractive mode is not a valid operation. Specifiy the ServiceNotification or DefaultDesktopOnly style to display a notification from a service notifcation".

 

Is there anyway I can set how that message is displayed?

 

Thanks

 


 

Sorcha