The Artima Developer Community
Sponsored Link

Web Services Forum
safe conection between web services

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Adriano Richard

Posts: 1
Nickname: arichard
Registered: Jan, 2006

safe conection between web services Posted: Jan 13, 2006 5:04 AM
Reply to this message Reply
Advertisement
Hi!

I'm working with two web services. They are in different servers. I need to change information between them, but for this i must implement a safe data traffic canal through SSL Protocol.

An important detail is my necessity to use certificate of machine.

In the following code examples, i'm trying to do this.



Server One:

//----------------------------------------------------------------------- ----------
//intance of the other web service...
CertServiceWse ws = new CertServiceWse();

X509CertificateStore store = null;
store = X509CertificateStore.LocalMachineStore(X509CertificateStore.MyStore);
store.Ope nRead();

string ClientBase64KeyId = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";

X509CertificateCollection certs = store.FindCertificateByKeyIdentifier( Convert.FromBase64String( ClientBase64KeyId ) );
X509Certificate x509 = (X509Certificate)certs[0];
ws.ClientCertificates.Add(x509);

ws.Credentials = CredentialCache.DefaultCredentials;



string aux = ws.Cert();

return aux;
//------------------------------------------------------------------------ ---------



Server Two:

//----------------------------------------------------------------------- ----------
HttpContext httpcontext;
httpcontext = HttpContext.Current;
HttpClientCertificate cert = httpcontext.Request.ClientCertificate;
return cert.Issuer;
//---------------------------------------------------------------- -----------------



When i run the application, a 403 error (Acess Forbidden) is presented.

How can i solve this problem???
Somebody already made something like this?

Thanks...

Topic: AXIS http post Previous Topic   Next Topic Topic: Unable to add the web service to registry

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use