.NET
  Home arrow .NET arrow Page 3 - Smart Cards in .NET
ASP Free Forums 
.NET  
ASP  
ASP Code  
ASP.NET  
ASP.NET Code  
BrainDump  
C#  
Code Examples  
Database  
Database Code  
IIS  
Microsoft Access  
MS SQL Server  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
ASP Web Hosting  
ASP.NET Web Hosting 
Mobile Linux 
App Generation ROI 
Windows Web Hosting
 
IBM® developerWorks 
Sun Developer Network 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
.NET

Smart Cards in .NET
By: Digvijay Chauhan
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 97
    2004-03-15

    Table of Contents:
  • Smart Cards in .NET
  • The Solution
  • Three More Methods
  • A New Reference
  • The Code

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Smart Cards in .NET - Three More Methods


    (Page 3 of 5 )

    The following three methods provide the necessary UI components:

    1. SelectReader: Presents the user with a dialog that displays the available IFDs connected to the PC and allows selection of one.
    2. EjectCard: Presents the user with a dialog that notifies the user that the card can be removed safely from the reader.
    3. InsertCard: Presents the user with a dialog signifying that the reader can receive a card now.

    And the following five methods provide the way to easy smart card access:

    1. OpenReader
    2. CloseReader
    3. GetReaderName
    4. SetReaderName
    5. SendCommand

    I finalized all these UI items and methods after reviewing the PS/SC workgroup (http://www.pcscworkgroup.com) recommendations for implementing such a library. The specification is open and is available for free download at the website.

    The COM component is implemented as a DLL and it needs to be registered on the client machine, which can be done by simply running regsvr32.exe <DLL Name> at the command prompt.

    Once the component is registered you can use it in a variety of programming languages to access smart Card IFDs which are based on PC/SC specifications. I’m glad that most, if not all of the available Smart Card readers fall under this category. You can find three such usages in the samples accompanying this article.  Let’s move on to .NET and smart cards.

    Create a Windows Application in C# or VB.NET. Using the Add Reference … | COM Components tab locate the SCardLib 1.0 Type library and add it to your project. The following images will explain to you how to do it.

    Smart Cards 

    Smart cards

    More .NET Articles
    More By Digvijay Chauhan


     

    .NET ARTICLES

    - Using CrystalReportViewer to Display Crystal...
    - Creating Summary .Net Crystal Reports
    - More on Commands, Input and the WPF
    - Grouping and Aggregating When Querying LINQ ...
    - Commands, Input and the WPF
    - Keyboard and Ink Input with WPF
    - Mouse Input and the WPF
    - Input with Windows Presentation Foundation
    - Introducing LINQ with XML and Databases
    - An Introduction to LINQ
    - Querying LINQ to SQL: Basics
    - Completing a Simple Storefront with LINQ
    - Knowing Your Environment: the System.Environ...
    - Creating the Home Page for a Simple Storefro...
    - LINQ Quickly with Language Integrated Queries

     
    Best Practices for Windows Vista Migration Presentation
    Dell and Microsoft recently held a series of face-to-face seminars entitled, &qu....

     
    Creating a Culture for Code Reuse
    If you oversee development teams you know that like it or not proprietary and ex....

     
    Keys to Web Application Acceleration: Advances in Delivery Systems
    Accelerate Web apps by up to 5x. Ensure significantly faster access to the Web a....

     
    Optimizing Application Monitoring
    Tired of finding out from your customers that you're offline? This white paper e....

     
    Solaris to Solaris Migration -- Migrating applications from Sun SPARC to Dell PowerEdge R900
    This comprehensive Migration Guide reviews the approach that Principled Technolo....

     




    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
    Stay green...Green IT