views:

521

answers:

2
+2  Q: 

Can't resolve DNS

Hello; I'm trying to consume a webmethod but it seems that my application can't resolve DNS. The problem surfaces when I configure my application with an url (e.g.: http://mywebservice.com/webservice/methods.asmx), but it does not when I access the same webmethod through the server's IP address.

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.

Can anyone help me ?

Thanks in advance.

UPDATE: Checking out what moocha asked me to do, I found out that:

D:>nslookup server.com Server: dnsserver.mycompany.com Address: XXX.YYY.XXX.YYY

*** dnsserver.mycompany.com can't find server.com: Non-existent domain

+3  A: 

Have you tried confirming the same DNS query works via nslookup from the same system on which your application runs?

I.e.,

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
Mihai Limbășan
A: 

Digging a little bit more I found that there is a proxy in between my PC and the server. 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. All I had to do was to configure in the IIS an user that has permission to access the internet (through the proxy). 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.

El Padrino
You should be careful when doing this since if the IIS service gets compromised somehow, then it will have the same permissions as the user you're using. (hopefully you followed that)
Allain Lalonde
Allain, thanks for the advice. I have been working on that requirement recently.
El Padrino