I am working on uwp app. I edited hosts file and redirecting www.example.com to local server IP(192.168.1.187). In browser website is loading properly but in application
System.Net.Dns.GetHostAddresses("https://www.exaple.com")[0]
Throws System.Net.Sockets.SocketException
If I remove http
/https
, it is working
System.Net.Dns.GetHostAddresses("www.exaple.com")[0]
output => 192.168.1.187
I want to specifically make a request to https://www.example.com
.