You may be getting the above error when you try to execute a CSOM code on a SharePoint
Online Site like below:
var tenant = new Tenant(clientContext);
SPOSitePropertiesEnumerable spp = tenant.GetSiteProperties(0, true);
If you search in google, you may end up with pulling your hair out as they talk about Memory issues, RAM……
TIP: So, it is always better to search with SHAREPOINT included for errors in google.
This seems to be an issue related to DNS address not present in the system where you are running the code. Normally some ISPs (like my Airtel) do not provide DNS.
FYI: I am connected to my Airtel Broadband through a WIFI router.
So I did the below:
- Edited my existing connection properties from Network & Sharing Center & added google DNS 22.214.171.124
- Disabled the IPV6 for the connection