I'd like to download content from https://localhost:3000/
using WebClient.DownloadString method, but this call ends up with SocketException: No connection could be made because the target machine actively refused it
although the address is reachable via browser.
I figured out, that request is successful when I replace with 127.0.0.1
(so the address is https://127.0.0.1:3000
).
How can I fix it so that I can use localhost address (it needs to be localhost due to SSL certificate)?