Ver Mensaje Individual
  #16 (permalink)  
Antiguo 30/06/2005, 09:36
wakewakeup
 
Fecha de Ingreso: octubre-2004
Mensajes: 878
Antigüedad: 20 años, 5 meses
Puntos: 1
Pues creo que lo he hecho como lo hacias tu en un principio, pero en c#:

Desde aplicacion windows forms llamo al web service:
Código:
	System.Security.Cryptography.X509Certificates.X509Certificate cert;
cert = System.Security.Cryptography.X509Certificates.X509Certificate.CreateFromCertFile(@"c:\certcliente.cer");
misw.Prueba proxy = new misw.Prueba();
proxy.ClientCertificates.Add(cert);
lblSuma.Text = proxy.suma(1,b++).ToString();

Servicio web
Código:
[WebMethod]
public int suma(int a,int b)
{
				
HttpClientCertificate cert = Context.Request.ClientCertificate;
if (cert.IsPresent)
	{
	return a+b;
	}
return 0;
}
A mi me pasaba lo que a ti, pero agregando el certificado del CA por mmc me distingue bien con certificado y sin certificado.