RestSharp是否会赢得胜利?
我试图连接到部署在Windows Server上的API,该API不属于域。
当我以这种方式初始化restclient时,我的请求失败。如果我提供机器的IP地址,我的请求正常工作。
var options = new RestClientOptions("https://MyMachine/") {
Timeout = 1000
};
var client = new RestClient(options);
我的猜测是,RestSharp只能执行DNS查找,而不是赢得查找。我猜是对吗?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
非常感谢您的投入,了解我走错了方向很有帮助。
我通过添加以下行解决了我的问题:
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: