views:

235

answers:

4

Hi, 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.

+2  A: 

Hi there,

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

good luck

Toby

TobyEvans
A: 

I've find the solution. I load a Javascript that create an activeXobject and use my dll installed on the client. Something like this:

<script language="javascript">

   function Run() 
       {
           var x = new ActiveXObject("ASC.SC");
           txtRd.value = x.AutoRead();
       } 
</script>

Thank you for your help.

Grassino87
A: 

If you're trying to use the smart card for authentication, you should use the Smartcard Authentication Module written by a co-worker of mine. It's very secure and should do the trick.

John Bledsoe
I need to write and read data from the smartcard
Grassino87
A: 

My company makes a commercial plug-in for this purpose.

It includes IE and firefox/chrome support, and provides a scripting language for writing simple server side scripts that control the smart card. It also includes functions for interacting with the browser (like putting the value that was read from the smart card into a field on the web page, or navigating to different web pages).

There are a number of demonstrations online that you can use to see if it suits your requirements: https://cardboss.cometway.com

Damien