문제

I use .NET\C# to manage Windows user's certificate. When I use X509Store.Add() method it works for some users, but it sometimes fails with "Internal Error".

What could be a cause?

도움이 되었습니까?

해결책

It turned out that the problem was only with new users which were created by code. Further investigation revealed that there was the cause was a missing home directory. Windows has troubles with importing a certificate (with priv key) to a user without its profile directory already created, hence "Internal Error".

The solution was to force creation of the home directory for all new users created by code.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top