user name correct. I'm using (domain_name)\ASPNET, but the tool doesn't seem
"Joe Kaplan (MVP - ADSI)" wrote:
> Are you supplying the certificate from a file? One thing to keep in mind is
> that no matter how you tell the client which certificate to use, Windows is
> still going to try to get the private key for the certificate by looking for
> that in the available CSP containers. It is stored separately from the
> certificate and is protected by the OS.
>
> If the identity you are running under is different in both cases (check
> System.Security.Principal.WindowsIdentity.GetCurrent().Name), then the CSP
> containers that are available will be different too as there is a "per user"
> store and a machine wide store.
>
> If the cert private key is installed in the machine wide store, then I think
> this will work or if it is installed in the store for the user running the
> code. I'm not a great expert at crypto key containers, so I'm not the best
> person to ask all the details on. I just know that this is a common issue
> that comes up.
>
> Joe K.
>
> "jlento" <jlento@discussions.microsoft.com> wrote in message
> news:4FEE6DAC-28FF-4659-906F-282CBAEF1E18@microsoft.com...
> > Joe,
> >
> > As far as I can tell - Yes.
> >
> > When I step through the code both with the windows and the web front end,
> > the certificate retrieved hashes to the same value. However, is simply
> > obtaining the certificate and attaching it to the request enough? Are
> > there
> > some permissions that need to be set somewhere to allow the certificate to
> > be
> > used?
> >
> > "Joe Kaplan (MVP - ADSI)" wrote:
> >
> >> Are you sure the client certificate private key is available to the
> >> account
> >> that is running the web code? That seems like the most likely reason you
> >> would get a failure.
> >>
> >> Joe K.
> >>
> >> "jlento" <jlento@discussions.microsoft.com> wrote in message
> >> news:C5D7D4DD-6A5F-4EF4-B487-9DA624D0E7B1@microsoft.com...
> >> >I have a similar, yet different problem.
> >> >
> >> > I have a .dll that I've been able to successfully run in both a test
> >> > and
> >> > production environment that does a WebRequest.Create() and a
> >> > request.GetResponse() with a digital certificate attached.
> >> >
> >> > Everything works fine when I put a Windows frontend in front of my
> >> > .dll.
> >> > However, when I put an Web page in front of my .dll, the server I am
> >> > dealing
> >> > with returns an HTTP 403 Forbidden error.
> >> >
> >> > When I do a hash of the HttpWebRequest object created with the Windows
> >> > frontend, I get the exact same hash every time. When I do a hash of
> >> > the
> >> > HttpWebRequest object created with the Web page front end, I get a
> >> > different
> >> > hash eash time. Obviously there's a difference in how the
> >> > HttpWebRequest
> >> > object is being created depending upon the front end being used and
> >> > this
> >> > difference is the source of my problems.
> >> >
> >> > I initally thought of instantiating the request object using the
> >> > Windows
> >> > front end, then serialize the object and save it to a database.
> >> > Subsequent
> >> > calls would de-serialize the request object and use it. Trouble is,
> >> > the
> >> > request uses a variable query string, which as far as I can tell must
> >> > be
> >> > in
> >> > place at the time Create() is called. There's no way to set this
> >> > property
> >> > after the object has been instantiated
> >> >
> >> > "[MSFT]" wrote:
> >> >
> >> >> Hi Peter,
> >> >>
> >> >> For 1.1 framework :
> >> >> 821156 INFO: ASP.NET 1.1 June 2003 Hotfix Rollup Package
> >> >>
http://support.microsoft.com/?id=821156 > >> >> Along with this fix you will need to install the client certificate
> >> >> under
> >> >> the Local_Machine registry hive and not the Current_User hive. You
> >> >> will
> >> >> then need to give the ASP.Net account access to the private key for
> >> >> the
> >> >> client certificate to get all of this to work. You can use KeyWiz.EXE
> >> >> for
> >> >> this purpose.
> >> >>
> >> >> Also, you may consider following solution:
> >> >>
> >> >> Invoke the Web service from a Serviced Component, and use a Microsoft
> >> >> Windows service to automatically load the profile of the certificate
> >> >> user
> >> >> so that the Serviced Component can retrieve the client certificate and
> >> >> then
> >> >> communicate with the Web service over SSL.
> >> >>
> >> >> 1. Create a Windows service program with only one function to run
> >> >> under
> >> >> the
> >> >> certificate user identity.
> >> >>
> >> >> 2. Create a Serviced Component that runs under the identity of the
> >> >> certificate user.
> >> >>
> >> >> 3. Move the authentication code from the ASP.NET application to the
> >> >> Serviced Component. Verify that the Serviced Component runs under the
> >> >> identity of the certificate user.
> >> >>
> >> >> 4. Call the Serviced Component method from the ASP.NET Web
> >> >> application.
> >> >>
> >> >> Hope this help,
> >> >>
> >> >> Luke
> >> >>
> >> >>
> >>
> >>
> >>
>
>