简体   繁体   English

无法解析 DNS

[英]Can't resolve DNS

I'm trying to consume a webmethod but it seems that my application can't resolve DNS.我正在尝试使用 webmethod,但我的应用程序似乎无法解析 DNS。 The problem surfaces when I configure my application with an url (eg: http://mywebservice.com/webservice/methods.asmx ), but it does not when I access the same webmethod through the server's IP address.当我使用 url(例如: http ://mywebservice.com/webservice/methods.asmx)配置我的应用程序时,问题就会出现,但当我通过服务器的 IP 地址访问相同的 webmethod 时,它不会出现。

The thing is that I need to access the webservice using the url and not the IP address due to an existing DHCP server policy.问题是,由于现有的 DHCP 服务器策略,我需要使用 url 而不是 IP 地址访问网络服务。

Can anyone help me ?谁能帮我 ?

Thanks in advance.提前致谢。

UPDATE: Checking out what moocha asked me to do, I found out that:更新:查看 moocha 要求我做什么,我发现:

D:>nslookup server.com Server: dnsserver.mycompany.com Address: XXX.YYY.XXX.YYY D:>nslookup server.com 服务器:dnsserver.mycompany.com 地址:XXX.YYY.XXX.YYY

*** dnsserver.mycompany.com can't find server.com: Non-existent domain *** dnsserver.mycompany.com 找不到 server.com:域不存在

Have you tried confirming the same DNS query works via nslookup from the same system on which your application runs ?您是否尝试过通过 nslookup从运行您的应用程序的同一系统中确认相同的 DNS 查询是否有效?

Ie, IE,

C:\>nslookup
Default Server:  whatever.dns.example.org
Address:  111.222.333.111

> set q=a
> mywebservice.com
Server:  whatever.dns.example.org
Address:  111.222.333.111

Non-authoritative answer:
Name:    mywebservice.com
Address:  208.254.26.139

Digging a little bit more I found that there is a proxy in between my PC and the server.再深入研究,我发现我的 PC 和服务器之间有一个代理。 Therefore, I'm oblied to log with a valid user in order to access the internet.因此,我必须使用有效用户登录才能访问互联网。 The problem was that my application's server (where the IIS is running) was configured to run using anonymous access.问题我的应用程序服务器(运行 IIS 的地方)被配置为使用匿名访问运行。 All I had to do was to configure in the IIS an user that has permission to access the internet (through the proxy).我所要做的就是在 IIS 中配置一个有权访问互联网的用户(通过代理)。 Finally the problem is solved.终于问题解决了。

There was another option, I could use the logged user's credentials to grant access through the proxy;还有另一种选择,我可以使用登录用户的凭据通过代理授予访问权限; but that required that all users use the same log in information for the application and the intranet.但这要求所有用户对应用程序和内联网使用相同的登录信息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM