Accessing certificate store from ASP.NET web project



Hello,
I've ran into a sticky situation. I currently have a ASP.NET
web project, this project uses webservices to receive XML from various
locations. One of the locations requires a x509 certificate in order
for it to work properly. All was good until they sent us a new
certificate two weeks ago. Now using the export *.cer method I can no
longer hit there webservice. They tell me that anything thats going
wrong is on my end. After much playing around with it, I decided to
try the CryptoAPI way instead, which would be just to hit the actual
certificate store and gather all the certs in a collection and pull
the one that i need directly from it and apply it to the
httpwebrequest object. I wrote up a small C# console app, this app is
very basic its just going to the store gathering the certs then
applying the cert to a webrequest object then hitting the URL. As a
console app this works just fine. I adjusted my console app to become
a compiled DLL. I then add a reference to my VB project of that DLL.
But now I cannot grab any certificates from any store. I believe this
has to do with the fact that the console app is running under a
different user context than my vb.net web project. My question would
be how can get my ASP.NET web project to actually have access to the
certificate store? I've followed along on http://msdn2.microsoft.com/en-us/library/aa302408.aspx
this page numerous times giving permission to the ASPNET/
NetworkService/Administrator users to that particular certificate.
but nothing will access it. Its currently residing on both my
certificates of my local user as well as the certificates of my local
computer. Is there anyway to get this to work properly? The code
that is being based off of is from the microsoft page that explains
the two ways to access the certificate. The *.cer way and the
CryptoAPI way. Any information would be greatly appreciated.

.



Relevant Pages

  • Re: C# DLL - Used in VB Project - Certificate Store gathering certs for use in httpwebreques
    ... converted quickly to a console app by adding a MAIN and adjusting the ... This is your typical hit a webservice with a certificate and process ... running the console app and obtaining the certificate from the store ... BUT when i include the DLL that was created ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Accessing certificate store from ASP.NET web project
    ... My app gives you the name of the private key container - now you only need System.Security.AccessControl to set the necessary ACLs on it. ... case the cert must be in the local computer/personal) store - it will ... certificate two weeks ago. ... different user context than my vb.net web project. ...
    (microsoft.public.dotnet.security)
  • Re: Function A is not a member of Class 1
    ... AlBruAn wrote: ... for a web project (too much hassle to set up) - a simple console ... question from a console app. ...
    (microsoft.public.dotnet.framework)
  • C# DLL - Used in VB Project - Certificate Store gathering certs for use in httpwebrequest
    ... converted quickly to a console app by adding a MAIN and adjusting the ... This is your typical hit a webservice with a certificate and process ... BUT when i include the DLL that was created ... currentCertContext = CertEnumCertificatesInStore(storeHandle, ...
    (microsoft.public.dotnet.framework.aspnet)