C# – How to i access to smartcard from ASP.NET site

asp.netcsmartcardsmartcard-reader

i need to comunicate with a smartcard from an ASP.NET site. I've create a dll(using Winscard.dll and MCSCM.dll that is the SCM Micro Reader's dll) that work with the cardreader on windows but i'm not able to use it with ASP.NET. The project will run only on IE and i must avoid Javascript.

Thank you for the help.

Best Answer

I had this problem 8 years ago, but with ASP as we called it then

The problem is that the ASP code runs on a remote server, whereas your smartcard reader is a local piece of hardware

How I got round it was a small client application that regularly polled the smartcard reader for a card insert/removal. If a card was inserted, then it called a web-service to alert the server, which created a unique key based on the card and some random number. It then asked the user to enter a PIN, which was related to the card id and random number.

This meant that it required the particular card and an unreapeatable number. I pretty sure I used SSL to encrypt the web-service message, which of course is the most vulnerable part of the system

that's how I did it. The SCM tech support guys are really helpful and speak excellent English, it may be worth giving them a shout