Passing smart card password to RAS connection

May 3, 2009 at 11:09 PM
First off, this project is awesome :) Many thanks.

I was wondering if there is a way to supress and detect the request for a smart card password and then pass the smart card password to the RAS connection.
Coordinator
May 4, 2009 at 1:41 AM
Edited May 4, 2009 at 1:41 AM
I'm not all that familiar with how smart cards work, or how they tie into the dialer (if that's how you're using it) so I don't know to be honest.

From what I saw in the SDK, it looks like it's tied to the entry somehow. If there is a password being included with the connection, my guess is that should be passed into the NetworkCredential object when calling Dial or DialAsync on the RasDialer component.

When I'm working with entries, you could try doing what I do:
1) Create an entry using Windows exactly as you'd want to mimic programmatically.
2) Open the phone book the entry is stored in, and copy down all of the settings that Windows chose.
3) Create the RasEntry instance in your code and set the properties on the object the same as what you copied down from the entry created in step 1.

After comparing an entry myself, it looks like the only difference between using a smart card for authentication and a standard password is the CustomAuthKey property on the object being set to 13. I'd still check it myself if I was you, I don't know how to work with smart cards, but that's what I noticed.