Library error on Windows 8 , Windows 8.1.

8/25/2014 8:25:36 AM
Gravatar
Total Posts 5

Library error on Windows 8 , Windows 8.1.

hi, I can't use library on Windows 8 , Windows 8.1. Library return
 

Attempted to read or write protected memory.This is often an indication that

other memory is corrupt

 

 

it can run  on other windows

 

Thank you.

8/25/2014 9:26:01 AM
Gravatar
Total Posts 300
Ugo Chirico http://www.ugochirico.com

Re: Library error on Windows 8 , Windows 8.1.

NCryptoki works on any Windows OS from Windows XP to Windows 8.1.

We have thousands of customers that are using NCryptoki and noone has got such a problem.

What PKCS#11 module (dll) are you loading?

NCryptoki loads a PKCS#11 dll to work. The problem may be due to such PKCS#11.

8/25/2014 10:17:01 AM
Gravatar
Total Posts 5

Re: Library error on Windows 8 , Windows 8.1.

 

digitalSigner = new DigitalSigner("C:\\Program Files\\LunaSA\\cryptoki.dll");
digitalSigner.OpenSession(1);

digitalSingner.Login("pass")      <<<< error

 

I develop with C# in VS.2012

 

Thank you for support

8/25/2014 10:22:51 AM
Gravatar
Total Posts 300
Ugo Chirico http://www.ugochirico.com

Re: Library error on Windows 8 , Windows 8.1.

You called OpenSession(1), this means that you are tryng to connect to the Slot 1. Are you sure you have two slots available (0 and 1).

Did you try to call OpenSession(0)?

8/25/2014 10:42:36 AM
Gravatar
Total Posts 5

Re: Library error on Windows 8 , Windows 8.1.

I have tryied have the same problem

8/25/2014 10:56:57 AM
Gravatar
Total Posts 5

Re: Library error on Windows 8 , Windows 8.1.

I can run this code in .NET FW 3.5 on Windows 8 , but I can't run this code in .NET FW 4.0 on Windows 8.

And

I can run this code in .NET FW 4.0 on other Windows (7,server2008 R2).

8/25/2014 11:19:06 AM
Gravatar
Total Posts 300
Ugo Chirico http://www.ugochirico.com

Re: Library error on Windows 8 , Windows 8.1.

I guess the problem is related to cryptoki.dll that you are using on that Windows 8.1 installation.

Are you working on 32 or 64bit system?

On a 64bit system your .net application runs as 64bit and can load only a 64bit dll. check this.

 

8/25/2014 12:33:03 PM
Gravatar
Total Posts 5

Re: Library error on Windows 8 , Windows 8.1.

I use 64bit all windows only . I don't have NCrytoki Library for 64 bit

 

Thank you for support

8/25/2014 4:24:45 PM
Gravatar
Total Posts 300
Ugo Chirico http://www.ugochirico.com

Re: Library error on Windows 8 , Windows 8.1.

NCryptoki is a .NET assembly and it can work on both 32 and 64bit OS.

I mean cryptoki.dll, the dll of your PKCS#11 module.

Are you sure you are using the 64bit one?

8/26/2014 10:08:05 AM
Gravatar
Total Posts 6

Re: Library error on Windows 8 , Windows 8.1.

Hello

cryptoki.dll we are using is from x64 driver, so it should be 64-bit. Basically, if we run the project using .NET Framework 3.5, it works without such error. However, when we attempt to use .NET Framework 4.0 or higher, we received the following error:

An unhandled exception of type 'System.AccessViolationException' occurred in NCryptoki.dll

Additional information: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

8/26/2014 10:10:20 AM
Gravatar
Total Posts 300
Ugo Chirico http://www.ugochirico.com

Re: Library error on Windows 8 , Windows 8.1.

It's very strange. We never seen this error till now.

Can you send us the stack trace of the exception?