473,466 Members | 1,416 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Error while proccessing certificate.Load

hi,

Im getting a Error while importing a PFX using Certificate.Load
method

My code is VBscript

const CAPICOM_KEY_STORAGE_EXPORTABLE=1
const CAPICOM_KEY_STORAGE_FLAG=1
const CAPICOM_KEY_STORAGE_DEFAULT=1
const CAPICOM_KEY_LOCATION=1
const CAPICOM_CURRENT_USER_KEY=1

Set st = CreateObject("CAPICOM.Store")
st.Open CAPICOM_CURRENT_USER_STORE,"MY",CAPICOM_STORE_OPEN _READ_WRITE

For Each Certificate In st.Certificates
certificate.Load("c:\1.pfx", password,
CAPICOM_KEY_STORAGE_FLAG.CAPICOM_KEY_STORAGE_DEFAU LT,
CAPICOM_KEY_LOCATION.CAPICOM_CURRENT_USER_KEY);
exit for

This is my script. So while importing It displaying a Script Error as
Object Identifier : [number: 1] in certificate.load line

Can anyone tellme , what will be the problem, and what ll be the
solution , or any other sample code for importing certificate is
there, plz send me that

Rgrds
Dinesh

Mar 16 '07 #1
1 2288
Hi,

I have a little different problem than you. I am trying to
automatically import Certificates using VBscript and every time I call
the function Store.Load or Store.Add , I receive "Access is Denied".
>From other messages here and MSDN docs its looks like that Web based
scripts cannot call this function (probably due to security) and
VBScript is web based scripting language. But maybe I am wrong...

ba*****************@gmail.com כתב:
hi,

Im getting a Error while importing a PFX using Certificate.Load
method

My code is VBscript

const CAPICOM_KEY_STORAGE_EXPORTABLE=1
const CAPICOM_KEY_STORAGE_FLAG=1
const CAPICOM_KEY_STORAGE_DEFAULT=1
const CAPICOM_KEY_LOCATION=1
const CAPICOM_CURRENT_USER_KEY=1

Set st = CreateObject("CAPICOM.Store")
st.Open CAPICOM_CURRENT_USER_STORE,"MY",CAPICOM_STORE_OPEN _READ_WRITE

For Each Certificate In st.Certificates
certificate.Load("c:\1.pfx", password,
CAPICOM_KEY_STORAGE_FLAG.CAPICOM_KEY_STORAGE_DEFAU LT,
CAPICOM_KEY_LOCATION.CAPICOM_CURRENT_USER_KEY);
exit for

This is my script. So while importing It displaying a Script Error as
Object Identifier : [number: 1] in certificate.load line

Can anyone tellme , what will be the problem, and what ll be the
solution , or any other sample code for importing certificate is
there, plz send me that

Rgrds
Dinesh
Mar 29 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Tetedeiench | last post by:
Hi ! I am currently changing the server for my website, and i make a heavy use of openssl functions. Both servers use PHP4.3.3 with OpenSSL 0.9.6i. I was actually testing with this code,...
1
by: Leonard Danao | last post by:
I get this error when i run my code below "An unhandled exception of type 'System.Net.WebException' occurred in system.dll Additional information: The remote server returned an error: (401)...
0
by: Johan Delimon | last post by:
Hello, I have created an ASP page that requests special V2.0 Certificates for a user. This is to use with our VPN solution. My code errors on this line: requeststr =...
0
by: Will | last post by:
It seems that I have scoured the net and came up empty handed. I have an ASP.net app that posts xml to another company's servlet. For some transactions, they do not require a certificate, but...
4
by: Matthew.DelVecchio | last post by:
hello, i am developing an ASP.NET web app that consumes a 3rd party vendor webservice. it is my first one so while ive done my homework, im not an expert on the matter. our partner's...
1
by: | last post by:
Hi, I'd like to store X509 cetificates in a central location (file server, database, etc), and load them when needed, is it practical ? and in term of implementation, can this be achieved by...
0
by: Ron | last post by:
Hi there, I am writing a program which need to see the certificate in trusted people store for security purpose. when I run the program, it says "couldn't find the certificate in trusted people...
0
by: AK | last post by:
Hi, I'm trying to load a certificate, but get an exception saying " The specified network password is not correct.". There's no password for the certificate, so I don't think it has anything to...
2
by: =?Utf-8?B?U2NvdHQ=?= | last post by:
I have seen numerous posts, both here and google, where people are having this issue, but I have yet to see an explanation of the problem. I have a WCF service that is working fine using http....
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.