473,785 Members | 3,285 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

couldn't load certificate from trusted people store on XP

Ron
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 store ". I am using
VS2005 on XP sp2. I have imported a X509 certificate (c.pfx) into the
store on local machine account.

I wrote a small piece of code to see if the program can load cer from
the store but it returns 0. here under is the code:

System.Security .Cryptography.X 509Certificates .X509Store theStore = new
System.Security .Cryptography.X 509Certificates .X509Store("Tru sted
People Store",StoreLoc ation.LocalMach ine);
theStore .Open(OpenFlags .ReadOnly);
int count= theStore .Certificates.C ount;
string qq = string.Empty;

System.Security .Cryptography.X 509Certificates .X509Certificat e2Collection
ff = (X509Certificat e2Collection)th eStore .Certificates;
foreach (X509Certificat e2 rr in ff)
{
qq = rr.GetName();
}
x.Close();

Any idea?

Thanks!
Ron

Apr 9 '08 #1
0 3047

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

Similar topics

7
3779
by: javatiger | last post by:
Can anyone give me the code or point me in the direction of a simple javascript certificate maker so that users can input there name and date so as to use on my site? cheers
1
2265
by: Tony | last post by:
Anyone use WSE 2.0 sample certificates? I import them into Local Machine/Current User certificate store, but I got "This CA Root certificate is not trusted because it is not in the Trusted Root Certification Authorities store." How can I got the CA Root certificate of the issuer "Root Agency"?
1
458
by: borovA | last post by:
I am trying to access an Web. The problem is that they expect the client to submit a certificate. I can access the site from my browser, but it always asks which certificate I want to use. How can I do this in my code. So far I can get the certificate. It's properly formatted, and I can instantiate a X509Certificate object with it. But I can't figure out how to add it to the Root store, so it is trusted. Even if I add it to the...
4
11329
by: Matt Frame | last post by:
I am working on a special ASP.Net application that receives files from customers. The connection is made via HTTPS and the client sends the file as a POST to my ASP.Net listener. All of this works fine. Now I am looking at how to validate the clients certificate programmatically. The client application sends to me with something like: .... Dim myHttp As HttpWebRequest = CType(WebRequest.Create(https://myserver/Receive.aspx),...
1
4678
by: Marvin | last post by:
my asp.net app is posting to another webpage using httpwebRequest & x509Certificates and in return the certificate's name used for the posting is sent back. But instead of getting information about the cert returned I'd get no information message. I know my certificate is valid because when I manually type the address my app is posting to in IE it would return the client certificate's name used in my users personal store. So...
1
2307
by: balakrishnan.dinesh | last post by:
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
1
2399
by: Rymfax | last post by:
Hello, I'm hoping you guys can help me out. I'm trying to extract the certificate info from a digitally signed .cat file for a driver and then add that certificated as a trusted publisher. I'm having no real luck figuring out how to do this. I have an example of how to make a self-signed certificate and add it to a certificate store, but I'm completely stuck on how to get the certificate info out of the .cat file.
2
8999
by: ucb01 | last post by:
Hi, I am working with Visual Studio 2005 in C#. Using makecert I create a self-signed certificate A with a private key then a certificate B based on A. The first is installed in the 'Certificate Authorities .. ' store, the second in the 'Personal' one. My application need to use the certificate B to sign binary data. In debug mode, my application runs perfectly (under Cassini, VS web server) but after deployment there is no way to...
1
6022
by: =?Utf-8?B?Umljaw==?= | last post by:
I am developing a WCF based app on Vista using IIS 7.0 but it will be deployed on Microsoft Server 2003 with IIS 6.0. The app uses WSHttpBinding and mutual Certificate authentication. The app works fine in the Vista IIS7.0 environment, but when moving it to the test environment that matches production, I cannot get certificate authentication to work. I get the following error: "The certificate that was used has a trust chain that cannot be...
0
9643
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10315
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9947
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8968
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7494
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5379
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5511
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4045
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 we have to send another system
2
3645
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.