fretgfr
FileNotFoundException When Reading SmartCard ID
Hello,
I'm working on an application that needs to read the id of smartcards to check people into meetings.
Working in WPF with .NET 4.7.2 and using the Windows API to read the cards (Windows.Devices.SmartCards). Piecing together what needs to be done to read it, I've come to the following flow:
- find readers on application startup and add an event handler for CardAdded
- in the handler, get the SmartCardProvisioning for the SmartCard provided by the event.
- attempt to read the card id with SmartCardProvisioning.GetIdAsync
When calling GetIdAsync, a FileNotFoundException is raised. I've tried printing the FileName that it's attempting to open to no avail.
Information on this is scarce, and any help is appreciated.
46 replies