Hi everybody, for this error I read several posts and applied the solution to indicate the TLS12 protocol, but the error still happens to me in BUILD and TEST, but it was fixed on the development machine.
the code is as follows:
str url;
str postData;
str returnValue;
System.Net.HttpWebRequest request;
System.Net.HttpWebResponse response;
System.IO.StreamReader streamReader;
System.Net.ServicePoint servicePoint;
System.Net.ServicePointManager servicePointManager;
CLRObject clrObj;
Counter countCounter;
System.Net.ServicePointManager::set_SecurityProtocol(System.Net.SecurityProtocolType::Tls12 );
System.Text.UTF8Encoding encoding = new System.Text.UTF8Encoding(false, true);
System.Byte[] byteArray = encoding.GetBytes(_EQMRequestCSSCollaborate.XMLRequest);
new InteropPermission(InteropKind::ClrInterop).assert();
url = _EQMInterfaceParameters.EQMCSSSupplierURL;
clrObj = System.Net.WebRequest::CreateHttp(url);
request = clrObj;
request.Method = 'POST';
request.ContentType = 'text/xml; charset=utf-8';
request.ContentLength = byteArray.Length;
using(var dataStream = request.GetRequestStream())
{
dataStream.Write(byteArray, 0, byteArray.Length);
}
Do you know how to fix it?
Regards,
Adolfo