Consuming Web Reference C#

Asked

Viewed 701 times

0

I’d like a little help from you

I added the Service via Web Reference

NFSeBeloHorizonteMG.NfseWSService ws1 = new NFSeBeloHorizonteMG.NfseWSService();

ws1.Url = hostWS;

X509Certificate certificado = cert.BuscaNroSerie(noSerieCert, false);
ws1.ClientCertificates.Add(certificado);
ws1.UseDefaultCredentials = true;

string result = ws1.ConsultarLoteRps(cabecalho, consulta);

when he arrives at Consultarloterps he gives the error

Request cancelled: Failed to create a secure channel for SSL/TLS.

I’m having this same problem in other service

is not certified because some service works normally with this certificate

  • error happens on localhost or only when you publish? cerficado is installed on the server and you are making the request from a secure environment, https/ssl?

  • The application and desktop, the certificate is installed on the machine and I’m trying to access the service nfse beautiful horizon

  • I was able to solve by updating my Visual Studio for 2010 and using Service Reference

  • Cool, what is the visual studio you were using before?

  • Visual Studio 2005

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.