Jump to content
Joao M Sousa

WebService TESTE

Recommended Posts

Joao M Sousa

Bom dia,

Estou a tentar utilizador o WebService de Testes para envio de Guias de transporte e recebo sempre o mesmo erro.

O da Produção esta a funcionar.

Ja actualizei os certificados.

 //FOR TESTS USE:
 //https://servicos.portaldasfinancas.gov.pt:701/sgdtws/documentosTransporte
 //username = "...../1"; nif da empressa
//user_password = "......";
 //public_cert = TesteWebServices.pfx
//certificate_password = TESTEwebservice 

//IMPORT CERTIFICATE
var cert = new X509Certificate2();
cert.Import(public_cert, certificatePassword, X509KeyStorageFlags.Exportable);

ERRO:

The underlying connection was closed: An unexpected error occurred on a send.
Authentication failed because the remote party has closed the transport stream.

 

Muito Obrigado.

Share this post


Link to post
Share on other sites
David

Olá João,

Estou com o mesmo problema, código que está a funcionar com os endpoints de PROD, no entanto alterando os certificados para test, obtenho o mesmo erro.

InnerException = {"Authentication failed because the remote party has closed the transport stream."}

Obrigado.

Edited by David

Share this post


Link to post
Share on other sites
albertosilva

Boas,

Até instalar o certificado de testes na máquina, não consegui comunicar com o servidor de testes, conforme relatado em diversas mensagens noutros tópicos aqui no p@p.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.