PKCS#11 working on localhost, but it is not working on a live web server (client machine)

982 Views Asked by At

I am working with Net.Pkcs11Interop.HighLevelAPI.Pkcs11 to get my epass2003 smart card token details. My code is working fine on localhost; after running I am getting all token information, but whenever I publish my code on my demo server and run the website on my machine my code does not detect my smartcard USB token.

1

There are 1 best solutions below

0
On

The problem turned out to be that the IIS does some sort of isolation to the application. Even if you change the user in the Application Pool, you won't be able to access the current user certificate store, so any digital signature will not work.

Even if the problems above are solved, if you require a pin prompt, I don't think the IIS will show it.

IIS is not suitable for this sort of application, an alternative I found is Kestrel server.

I also use ePass2003, and the solution I mentioned worked in Windows 10, and Windows Server 2019, but not Windows Server 2008; it was a pin prompt problem.

I use a couple of tokens simultaneously, and they work fine. But only on a physical machine, it doesn't see more than one token on a virtual machine.