我使用capicom控件删除证书,删除普通的证书都没问题,就是删除root 证书的时候 会出异常 错误代码是:-2138568445
上网查了下 好像是这个CAPICOM_E_NOT_ALLOWED错误,英语解释是
The attempted operation is not allowed.
For example, changing the PropID property of an ExtendedProperty object is not allowed if the object is attached to a certificate 源代码如下:
myStore.Open(CAPICOM_CURRENT_USER_STORE,"ROOT",CAPICOM_STORE_OPEN_READ_WRITE);
var myStoreCerts1 = myStore.Certificates.Find(CAPICOM_CERTIFICATE_FIND_SUBJECT_NAME,"CA Root");
alert(myStoreCerts1.Item(1).SubjectName);//已经可以得到要删除的证书的主题了
myStore.Remove(myStoreCerts1.Item(1));//使用这个方法时 就报异常了很郁闷查了一天都搞不明白 高手帮帮忙吧~在线等
上网查了下 好像是这个CAPICOM_E_NOT_ALLOWED错误,英语解释是
The attempted operation is not allowed.
For example, changing the PropID property of an ExtendedProperty object is not allowed if the object is attached to a certificate 源代码如下:
myStore.Open(CAPICOM_CURRENT_USER_STORE,"ROOT",CAPICOM_STORE_OPEN_READ_WRITE);
var myStoreCerts1 = myStore.Certificates.Find(CAPICOM_CERTIFICATE_FIND_SUBJECT_NAME,"CA Root");
alert(myStoreCerts1.Item(1).SubjectName);//已经可以得到要删除的证书的主题了
myStore.Remove(myStoreCerts1.Item(1));//使用这个方法时 就报异常了很郁闷查了一天都搞不明白 高手帮帮忙吧~在线等
刚才又查了下 说得删除私钥在删除 但是我的是根证书没私钥啊
真不明白 。。
高手来帮我看看吧
别沉啊 继续顶