Re: ASPNET To Web Service using SSL w/Client Certs
From: Cowboy \(Gregory A. Beamer\) (NoSpamMgbworld_at_comcast.netNoSpamM)
Date: 04/27/04
- Next message: Scott Allen: "Re: Event handlers"
- Previous message: RP: "Re: httpwebrequest timing out"
- In reply to: Tim Burris: "ASPNET To Web Service using SSL w/Client Certs"
- Next in thread: Tim Burris: "Re: ASPNET To Web Service using SSL w/Client Certs"
- Reply: Tim Burris: "Re: ASPNET To Web Service using SSL w/Client Certs"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 27 Apr 2004 09:55:01 -0500
First, a couple of URLs
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconsecuringaspnetwebservices.asp
the above link is also in the help file (has code samples)
This one is mobile dev, but the concepts still apply:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetsec/html/SecNetHT13.asp
Now that we have theory out of the way, here is a good sample code
(scroll down to "Web Services Security with C#")
http://docs.msdnaa.net/ark_new3.0/cd3/content/Type_Sample%20Applications.htm
NOTE: You can speed this talking process up with Remoting (web services that
do not use ASAMX, are not tied to HTTP and can use any port -- okay, rather
simplistic explanation, but it works). Perf is not everything, however, so
assess your needs before changing, as Remoting is a bit more involved in the
current .NET architecture.
-- Gregory A. Beamer MVP; MCP: +I, SE, SD, DBA ********************************************************************** Think Outside the Box! ********************************************************************** "Tim Burris" <tburris@colletonprep.org> wrote in message news:0D2289C3-334A-4ED4-B4A0-09FBA2F0238E@microsoft.com... > At the top here i will put a quick description of my problem followed by the long description. This way you want get bored reading! :) > > short version: > what is the best/recommended way for ASPNET apps to call web services that REQUIRE Client Certificates via SSL? > > long version: > our company has new requirements, all servers must REQUIRE SSL and Server/client certificates. > i have setup a test Win2003 server to issue certs so i have a full test environment on my machine. I have gen'd the server cert and applied it to my IIS secure site. I have issued 2 client certs, one for web browser one advanced and issued a "localmachine" cert. all this is done using http://myserver/certsvr tool. one to a seperate machine which as installed my test server's root authority chain and the client cert. if i hit a webpage or webservice using that machine and user i am prompted for my Certificate, i choose the one i gen'd and it works great. i can see webpages and get webservice data. > The other Cert that I gen'd is installed in the localmachine section of my 2003 server in the hope that my ASPNet code could use that client certificate to call the webservice that reside on the same machine. I added a reference to microsoft.web.services and used the x509 certificate objects from that dll to get the local machine store and find my certificate. that works great. I put the certificate in my webservice object's clientcertificate collection and call the webservice but i still get a 403 access forbidden error. I use the certificate plugin in MMC to see that the cert installed in Local machine DOES have a private key associated with it. I THINK that the problem is that somehow my ASPNET account cannot access the private key to property send my cert to the webservice. i've, reluctantly, given ASPNET full access to the \app data\Microsoft\Crypto\RSA folder. Ideas? suggestions? > this is extremely urgent as NONE of our 20+ servers can run any of our .NET applications now that they have made this SSL certificate changes
- Next message: Scott Allen: "Re: Event handlers"
- Previous message: RP: "Re: httpwebrequest timing out"
- In reply to: Tim Burris: "ASPNET To Web Service using SSL w/Client Certs"
- Next in thread: Tim Burris: "Re: ASPNET To Web Service using SSL w/Client Certs"
- Reply: Tim Burris: "Re: ASPNET To Web Service using SSL w/Client Certs"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|