Quantcast
Channel: Microsoft Dynamics AX Forum - Recent Threads
Viewing all articles
Browse latest Browse all 72043

How can use Tls 1.2 in Ax 2009

$
0
0

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??


Viewing all articles
Browse latest Browse all 72043

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>