How to send an XML from an NFEc to the server of homologation of the series using C # through the webservice NfeAutorizacao?

1

I have already added the references in the project, my code looks like this:

 public string EnviaSefaz(XmlNode xml, string url, string metodo)
    {
        try
        {

            ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;

            Servico01.NfeAutorizacao autorizar = new Servico01.NfeAutorizacao();

            Servico01.nfeCabecMsg cabecalho = new Servico01.nfeCabecMsg();

            cabecalho.cUF = "29";
            cabecalho.versaoDados = "3.10";


            autorizar.ClientCertificates.Add(Obter());


            string retorno = autorizar.nfeAutorizacaoLote(xml).InnerText;


            return retorno;
        }
        catch (WebException ex)
        {
            throw;
        }
    }

The result of this variable return is always: "2SEFAZBA_NFENW_v6.0.0999Rejection: Error not cataloged292018-05-03T23: 57: 40-03: 00"

WebService: link

Do you have any suggestions whatsoever? I already checked the website of the sefaz web services are active, I already validated the xml in their website and validated ok ...

grateful for the attention ...

    
asked by anonymous 04.05.2018 / 05:06

1 answer

0

I do not know if this is what is causing the error, but you are using the protocol TLS 1.2 (SecurityProtocolType.Tls12 ) for an NFe version 3.10 .

As far as I know the 3.10 version uses the protocol SSL 2.0/3.0 ( SecurityProtocolType.Ssl3 ).

TSL would be used from the 4.0 version.

    
18.07.2018 / 18:02