Click here to Skip to main content
15,885,546 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
When use the code below, windows throws me a dialog with the following message,"Windows security smart card select a smart card device" does anyone know why this is happening and how to prevent it?

https://i.stack.imgur.com/hcSqU.png[^]

What I have tried:

CspParameters parameters = new CspParameters(1, "Microsoft Base Smart Card Crypto Provider");

AsymmetricAlgorithm asymmetricAlgorithm = new RSACryptoServiceProvider(parameters);

string pubKeyXml = asymmetricAlgorithm.ToXmlString(false);

X509Store x509Store = new X509Store(StoreName.My, StoreLocation.CurrentUser);

x509Store.Open(OpenFlags.OpenExistingOnly);
Posted
Updated 8-Aug-22 6:55am
Comments
Richard MacCutchan 8-Aug-22 8:38am    
I would guess it is because you are trying to activate "Microsoft Base Smart Card Crypto Provider".
bmarcco 8-Aug-22 9:11am    
Do you know how to solve this problem?
Richard MacCutchan 8-Aug-22 10:23am    
What problem? Why are you trying to use the Smart Card Crypto system if you do not have a smart card?
bmarcco 8-Aug-22 10:30am    
My software communicates with the smart card, but in some situations Windows throws me a dialog with the content Windows security smart card select a smart card device. When Windows throws out a dialog, the execution of my program stops until the user clicks the confirm button on the dialog. Since my software is on the server, the clients are not able to confirm the dialog. Is there any other way to communicate with the smart card to avoid the Windows security smart card alert. Sorry for bad English :)
Richard Deeming 9-Aug-22 9:00am    
Is your smart card connected to your server, and configured for use by the AppPool / service account you're using?

If you're expecting code running on the server to use a smart card connected to the user's computer, then you're about to be sorely disappointed.

1 solution

Re: Windows Security Smart Card popup

Redirecting[^]
 
Share this answer
 
Comments
bmarcco 8-Aug-22 13:10pm    
I tried this before asking here, but it doesn't help

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900