Hi,
I'm reading xml from URL and using that xml. But The URL started using TLS 1.2 so my code is not running.
TLS 1.2 has been added in server (i see it in regedit protocols)
My old code is below. I used webclient but OpenRead method no works. I hope use HttpClient but i dont know use that.
FreeTxt EDMReadXML(name _Url)
{
System.Net.WebClient webClient;
System.IO.Stream stream;
System.IO.StreamReader streamReader;
System.String line;
Notes rXML;
;
new InteropPermission(InteropKind::ClrInterop).assert();
webClient = new System.Net.WebClient();
stream = webClient.OpenRead(_Url);
streamReader = new System.IO.StreamReader(stream);
line = streamReader.ReadLine();
rXML = streamReader.ReadToEnd();
while(!System.String::IsNullOrEmpty(line))
{
line = streamReader.ReadLine();
}
streamReader.Close();
streamReader.Dispose();
stream.Close();
stream.Dispose();
return rXML;
}
Can you help me pls??