How to retrieve all certificates in your X509Store

后端 未结 4 682
被撕碎了的回忆
被撕碎了的回忆 2021-01-01 10:07

I am using the following code to retrieve all certificates in my PC from an asp.net webapp. The certificates collection is empty, and I can\'t understand why.

I tri

4条回答
  •  旧时难觅i
    2021-01-01 10:26

    Add this line of code to the second line and see how it works:

    store.Open(OpenFlags.ReadOnly);
    

    and then this at the bottom :):

    store.Close();
    

提交回复
热议问题