SCARD_P_SHUTDOWN (0X80100018) – Smart Card Server Dying
Your smart card operation got killed because the server app shut down. Usually happens when the smart card service restarts or the app crashes.
Why You're Seeing This and What to Do First
Ran into SCARD_P_SHUTDOWN (0X80100018) on a client's Windows Server 2019 last month. They were mid-transaction with a smart card reader and the whole thing died. The message says it all: the operation has been aborted to allow the server application to exit. That server is the smart card resource manager service (SCardSvr). When it stops or restarts, every active smart card operation gets killed with this error.
First thing: don't panic. This isn't a hardware failure. Most of the time it's a service restarting itself or another app killing it.
Cause #1: Smart Card Service Restarting Itself
The smart card resource manager service is flaky. It crashes or stops unexpectedly on some systems, especially Windows 10 21H2 and Server 2019. Had a client whose service would restart every 20 minutes randomly. Their log showed SCARD_P_SHUTDOWN every time.
Fix: Restart the service properly, then check for auto-restart
- Open Services.msc
- Find Smart Card Resource Manager (it's SCardSvr in the service list)
- Right-click, choose Restart
- Check the Recovery tab: set first failure to Restart the Service, second failure to Restart the Service, third failure to Take No Action
- Click Apply, then start the service if it's stopped
If it keeps failing, run this from an admin command prompt to reset the service:
sc config SCardSvr start= auto
sc stop SCardSvr
sc start SCardSvr
Had a case where the service was set to demand start instead of auto. That caused it to stop when no app was using it, then fail when a new app tried to connect. Set it to auto.
Cause #2: Another App or Service Killing the Smart Card Server
This happens when an antivirus or security software thinks the smart card service is suspicious. I saw this with Symantec Endpoint Protection on a Windows Server 2012 R2 box. The AV would kill SCardSvr thinking it was malware.
Fix: Check event logs and add exceptions
- Open Event Viewer → Windows Logs → System
- Filter by source Service Control Manager and look for event ID 7036 or 7037. You'll see SCardSvr stopping
- If you see a security software stopping it, add exception for
C:\Windows\System32\svchost.exe -k LocalServiceAndNoImpersonationor specifically the smart card service
Also check Application and Services Logs → Microsoft → Windows → Smart Card → Admin. This log tells you exactly why the service stopped. Once I found a log entry saying SCardSvr terminated due to invalid certificate chain. Turned out a third-party smart card middleware was corrupting the service. Uninstalled that, problem gone.
Cause #3: The Calling Application Crashed or Closed
Sometimes the server isn't the system service. Some smart card applications run their own local server process. If that app crashes or the user logs off, you get SCARD_P_SHUTDOWN. Real scenario: a client used a custom Java-based smart card app. The app's service would crash on memory leak after 3 hours. Every time, the card reader threw this error.
Fix: Check the application's service or process
- Task Manager → Services tab → look for any service named after your smart card software (e.g.,
acsccid,pcsclite, or something from the card vendor) - If it's stopped, start it. If it keeps dying, update the software or check logs in the app's install folder
- For Java-based apps: increase heap size or fix memory leak. We added
-Xmx512mto the Java startup parameters and it ran stable for weeks
If it's a Citrix or Terminal Server environment, users logging off can kill the smart card session. That's normal behavior, but you can set the service to restart automatically to minimize downtime.
Quick Reference Summary
| Cause | What to Check | Fix |
|---|---|---|
| Service restarting | SCardSvr stopped in Services.msc | Restart service, set recovery options |
| Antivirus killing service | Event ID 7036 from security software | Add exception for SCardSvr |
| Application server crash | App-specific service not running | Restart app service, update or increase memory |
Bottom line: SCARD_P_SHUTDOWN is almost always a service stopping before you expected it. Find the service, keep it alive, and you're done. Don't replace the reader, don't reinstall drivers. Fix the service.
Was this solution helpful?