Until two weeks ago the application was working normally and thereafter stopped working with the following error: "The request was aborted: Could not create a secure channel for SSL / TLS." I also inform that in this period there was no update in the application and that I checked the digital certificate and it is also ok. I know this specific error is generic and can mean several things. Does anyone have an idea of what it can be? follows the part of the code where it presents the error:
try
{
StringBuilder xmlCielo = new StringBuilder();
xmlCielo.Append("<?xml version='1.0' encoding='iso-8859-1' ?>");
xmlCielo.Append("<requisicao-transacao id='" + ConfiguraceosCielo.Id_trasacao + "' versao='1.3.0'>");
xmlCielo.Append("<dados-ec>");
xmlCielo.Append("<numero>" + ConfiguraceosCielo.CodigoHoodid + "</numero>");
xmlCielo.Append("<chave>" + ConfiguraceosCielo.ChaveHoodid + "</chave>");
xmlCielo.Append("</dados-ec>");
xmlCielo.Append("<dados-pedido>");
xmlCielo.Append("<numero>1</numero>");
xmlCielo.Append("<valor>" + ConfiguraceosCielo.PrecoPrdudo1 + "</valor>");
xmlCielo.Append("<moeda>986</moeda>");
xmlCielo.Append("<data-hora>" + ConfiguraceosCielo.Data_hora_transacao + "</data-hora>");
xmlCielo.Append("<descricao>[origem: número_do_ip]</descricao>");
xmlCielo.Append("<idioma>PT</idioma>");
xmlCielo.Append("<soft-descriptor>" + "HoodID" + "</soft-descriptor>");
xmlCielo.Append("</dados-pedido>");
xmlCielo.Append("<forma-pagamento>");
xmlCielo.Append("<bandeira>" + Cartao + "</bandeira>");
xmlCielo.Append("<produto>" + ConfiguraceosCielo.Tipo_pg + "</produto>");
xmlCielo.Append("<parcelas>1</parcelas>");
xmlCielo.Append("</forma-pagamento>");
xmlCielo.Append("<url-retorno>endereco_de_retorno</url-retorno>");
xmlCielo.Append("<autorizar>" + ConfiguraceosCielo.Flagcreddeb + "</autorizar>");
xmlCielo.Append("<capturar>true</capturar>"); // transação capturada
xmlCielo.Append("</requisicao-transacao>");
var result = new WebServiceCieloRequest().Message(xmlCielo.ToString()).Response(); =>(O ERRO ACONTECE APÓS PASSAR POR ESSA LINHA)
string rt = result.ToString();
string RetornoXmlCodigo = rt;
int posicao_codigo = RetornoXmlCodigo.IndexOf("<tid>");
string Codigo = RetornoXmlCodigo.Substring(posicao_codigo + 5, 20);
Session["CodRetornoCielo"] = Codigo;
int posicao = rt.IndexOf("https");
string url = rt.Substring(posicao, rt.Length - posicao);
string novaurl = url.Replace("</url-autenticacao>", "").Trim();
novaurl = novaurl.Replace("</transacao>", "").Trim();
StringBuilder sbURL = new StringBuilder();
sbURL.Append("var janela;");
sbURL.Append("janela = window.open('" + novaurl + "','_blank'); ");
sbURL.Append("if(janela == null){ ");
sbURL.Append(" furl_cartao(); } ");
sbURL.Append(" else { ");
sbURL.Append(" furl_cartaoHb(); }");
}
catch (Exception Es)
{
msg = Es.Message.ToString();
Session["urlcielo"] = "N";
}
Thanks in advance for the help.