I am facing this problem again, I followed your article but I couldn't understand which part I missed in above code. Could you help me with this error "object reference not set to an instance of an object ". Which part I have missed in above code

The result code is returned by your device. It says "A read-only session already exists, and so the SO cannot be logged in". Most likely you are trying to login several times (probably from different threads).

I meant searching Google for the PKCS#11 error code. The codes are standard, not ours.

I guess that maybe you are trying to pass the user PIN and not a security office PIN, while passing the user type as SecurityOffice (0 as the first parameter in Login method). Try passing 1 (regular user).

We use cookies to help provide you with the best possible online experience. By using this site, you agree that we may store and access cookies on your device. You can find out more about and set your own preferences here.