Search code examples
c#restsharp

Does RestSharp perform WINS lookup?


I am trying to connect to an API deployed on a Windows server that does not belong to a domain.

When I initialize my RestClient this way my requests fail. If I provide my machine's IP address, my request works properly.

var options = new RestClientOptions("https://MyMachine/") {
    Timeout = 1000
};
var client = new RestClient(options);

My guess is, RestSharp only performs DNS lookup and not WINS lookup. Is my guess right?


Solution

  • Thank you very much for your input, it has been helpful to understand that I was on the wrong track. I solved my issue by adding the following line:

    ServicePointManager.EnableDnsRoundRobin = true;