.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Smart Storage: Protect Your Data Via Managed Code And The Windows Vista Smart Card APIs

Posted By:      Posted Date: August 21, 2010    Points: 0   Category :ASP.Net

Smart cards are a compelling alternative to the reliance on passwords, which are the weakest link in authentication systems. Get the Windows smart card programming basics here.

Dan Griffin

MSDN Magazine November 2006

View Complete Post

More Related Resource Links

Smart Tags: Realize the Potential of Office 2003 by Creating Smart Tags in Managed Code


While you may well be excited about the prospect of building managed smart tags, there is little information available to help you create them using .NET. In this article the author fills in the blanks. Along the way he discusses the Microsoft Office Smart Tag List XML schema, advanced managed smart tags for Office 2003 and Office XP, and deploying these features in an organization.

Ben Waldron

MSDN Magazine February 2005

How to create a windows mobile (Smart Device) .Cab installer

A Cab file is the default setup format for Windows CE and Windows Mobile devices (similar to windows .msi files). You probably already have installed several application using .cab files, and are familiar with the concept. One point which is often unknown is that .cab files are processed by wceloader.exe, and it can only install one .cab file at a time. That means we cannot have nested .cab files. It doesn't mean we cannot have .cab files contained by another .cab, but the contained .cab files will not be installed during the installation of the container .cab. We should install it manually after the container .cab file installation has been completed.

There are two ways to create a cabinet (.Cab) file. The traditional one, and the friendly VS Smart Device Cab project which doesn't require additional coding, but which also relies on the traditional one at low-level.

Data Points: Windows Azure Table Storage - Not Your Father's Database


Let go of your traditional relational database thinking if you want to understand how Windows Azure Table storage works, says Julie Lerman. Luckily for you, she's done the hard work to grasp the new concepts and help you get up to speed.

Julie Lerman

MSDN Magazine July 2010

Vista and Office: View Data Your Way With Our Managed Preview Handler Framework


Stephen Toub shows you how to write your own Preview handlers for Windows Vista and Outlook 2007.

Stephen Toub

MSDN Magazine January 2007

Smart Clients: Build A Windows Forms Control To Consume And Render WSRP Portlets


Smart client apps use local resources, provide a rich client experience, and support intelligent install mechanisms. Web services offer powerful interoperability and integration features. Find out how to combine them to develop integrated apps that incorporate data from disconnected sources.

Carl Nolan

MSDN Magazine February 2006

Talking Windows: Exploring New Speech Recognition And Synthesis APIs In Windows Vista


Windows Vista includes a built-in speech recognition engine exposed through a number of new APIs that will let your users interact with your app using speech rather than a keyboard or mouse. Here Robert Brown explains speech recognition and introduces you to the APIs to use in your upcoming Windows Vista applications.

Robert Brown

MSDN Magazine January 2006

Smart Clients: Craft A Rich UI For Your .NET App With Enhanced Windows Forms Support


The System.Windows.Forms namespace has increased by approximately 134 percent over the .NET Framework 1.1. There are 446 new public types; 113 existing types have been updated with new members and values; 218 types have been carried over from the original namespace. Read about it here.

Chris Sells and Michael Weinhardt

MSDN Magazine Visual Studio 2005 Guided Tour 2006

WMI and .NET: System.Management Lets You Take Advantage of WMI APIs within Managed Code


Visual Studio .NET and the Microsoft .NET Framework SDK provide a new set of APIs and tools that let you consume Windows Management Instrumentation (WMI) data and events from managed .NET applications. After presenting an overview of what's new for WMI in the .NET Framework and the Visual Studio .NET environment, the author provides an in-depth exploration of the Management Extensions in Visual Studio .NET for Server Explorer. These extensions help you develop management-aware software and come in handy in a variety of distributed application development scenarios.

Zina Pozen

MSDN Magazine May 2002

Windows Script Host: New Code-Signing Features Protect Against Malicious Scripts


Downloading scripts from the Web or e-mail leaves users vulnerable to security risks because scripts can't be signed. But now developers can use Windows Script Host (WSH) to hash scripts so users can verify their source and safety. With WSH, scripts can be signed or verified using all the same tools ordinarily used to sign EXE, CAB, DLL, and OCX files. This article discusses public-key cryptosystems, the process of signing and verifying scripts in WSH, and several warnings about attacks that could potentially be made against cryptographically secured scripts and ways in which to avoid them.

Eric Lippert

MSDN Magazine April 2001

RSACryptoServiceProvider + smart card with X509 certificate = Bad Key.

Hello! I'm trying the interop with Java. The task: create  SHA1withRSA signature of the document hash with .NET CLR. The singer key is an X509 certificate from external CA, and this signer certificate is on the smart card. 1. First solution: the .NET CLR SignedCms class passes the document hash to the Windows CryptoApi (and to the smart card), and the result is a PKCS#7 message with the signature. This solution works well with smart card, but the requirement is only the "SHA1withRSA" signature of document hash, the PKCS#7  message will be created at Java side. 2. Second attempt, create only "SHA1withRSA" signature:             // choosing certificate from smart card             X509Certificate2 card = GetCertificate();             // this fails when certificate is on the smart card:             RSACryptoServiceProvider rsa = (RSACryptoServiceProvider)card.PrivateKey;             // only the signed hash needed             byte[] signedHashValue1 = rsa.SignData(documentHash, new SHA1Managed()); The problem: the car

WMI Win32_PhysicalMedia SMART ID in Vista and 7 Permissions

I am using WMI in order to retrieve the SMART ID from the Win32_PhysicalMEdia class SerialNumber property.  Here is the problem:  In Vista an Windows 7 RC Build 7100, if you run the program as a local administrator to the computer, the serial number return is completely different than if you "Run as Administrator" or in "XP Compatibility mode"  Below is the code:

 strQuery As
 = "SELECT * FROM Win32_LogicalDiskToPartition"

 objSearcher As
 ManagementObjectSearcher = Nothing

 objPartitionSearcher As
 ManagementObjectSearcher = Nothing

 strSystemDriveLetter As
 = ""


            strSystemDriveLetter = IO.Path.GetPathRoot(Environment.GetFolderPath(Environment.SpecialFold

Getting error message and other data back from SSIS to managed code




From a SharePoint workflow we are trying to synchronously execute an SSIS package - which seems to work - and display error messages and return some variables back to SharePoint.


I followed the "Running a Package Remotely by Calling a Remote Component or Service" instructions on http://msdn.microsoft.com/en-us/library/ms403355.aspx and executing and parameterizing the package does not seem to be a problem. But the SSIS package does a lot of plausibility checking and raises an error (RAISERROR in T-SQL or Error

DllImport and smart card


Hello, i have a problem with a dll.

the dll is casmcard.dll, it interface to the ez100 card reader. i'm using a sle4442 smartcard.
The manufactor gave me a simple vb project that call some function from a static class (CasAPI). It wrap the functions using the dllimport.

I am working on a c# program, so i included the project, to use the CasAPI functions. It works, since i have to change the code of a card (SLE4442_Update_Security_Memory()). The point is that it works just in the vb project, and when i call it from my project it return an error code (SCARD_E_NO_MEMORY that means "Not enough memory available to complete this command").

The vb declaration is 

Public Declare Function SLE4442_Update_Security_Memory Lib "casmcard.dll" (ByVal hCard As Integer, ByRef SendBuffer As Byte, ByVal StartAddr As Integer, ByVal SendBufferLength As Integer) As Integer

and i call it as this

response = CasAPI.SLE4442_Update_Security_Memory(mSCardContext, ref code[0], 1, 3);

code is a 4 byte array 

in vb it is called like this:

Result = SLE4442_Update_Security_Memory(CardHandle, Data(0), 1, 3)


There are many other functions that use the reference of the first element of the array to fill it, and i verified that they all works, so it shouldn't caused by the array.

Cannot submit an infopath 2007 data source to sql database using managed code - C#.


Is this possible?  I can submit the data source just fine using custom action rules either from a submit button on the form or from the submit button from the tool bar.

But when I try to use C# nothing below works, Main Connection is my data source.  I get unhandled exception errors when I run the form in debug

AdoSubmitConnection sc = (AdoSubmitConnection)this.DataConnections["Main Connection"];

WebServiceConnection sc = (WebServiceConnection)this.DataConnections["Main Connection"];

FileSubmitConnection sc = (FileSubmitConnection)this.DataConnections["Main Connection"];

However I can send an email just fine using ;

EmailSubmitConnection sc = (EmailSubmitConnection)this.DataConnections["Email Connection"];


Any help would be greatly appreciated



Adding Web Service to Smart Device Project - Windows Mobile 6 Professional


Hi All,

I'm new to developing mobile apps and have hit a brick wall. I use Web Services all the time so I know I have created it correctly and it works. The issue is that i cant seem to add it to my class or form in the Smart Device Project.

When I right click I get the option to add Web Reference, I then navigate to the url and add as I normally would. When I then try to access the service I cant seem to navigat to it from code and it is not available. I have also tried adding a Web Service directly by 'Add New Item, but this file type is not available in the list of installed templates.

Any help here would be greatly appreciated.


Cannot upgrade to Win 64 using smart card toolkit


I have an older C# application that has been working fine, and it is using the SCWAPI.DLL and the WINSCARD.DLL.  I am upgrading the application that is using a driver for a device, and when it is run on 64 bit version of Windows 7, it needs to be compiled in X64 to work with this other driver.  When I do this, I can't find a 64 bit version of the SCWAPI.DLL, but there is a WINSCARD.DLL. 

Is there a replacement for the older smart card toolkit that will work on x64, or a 64 bit version of SCWAPI?


ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend