PDA

View Full Version : Reverse DNS Lookup


Jason
11-21-2003, 03:04 AM
I can't get Reverse DNS Lookup to work. I assume that it must be disabled on the discountasp servers. Is there any chance of this feature being enabled?

Jason
11-22-2003, 09:22 AM
I use the syntax Request.ServerVariables("REMOTE_HOST")

It gives an IP address, rather than a DNS lookup.

See http://support.microsoft.com:80/support/kb/articles/Q245/5/74.ASP

bruce
11-22-2003, 11:31 AM
Do you mean reverse DNS lookup on your web application?

We do not block reverse DNS look up from our server as far as I know.

Post URL & code if possible
[b]quote:Originally posted by Jason

I can't get Reverse DNS Lookup to work. I assume that it must be disabled on the discountasp servers. Is there any chance of this feature being enabled?
</blockquote id="quote"></font id="quote">

bruce
11-24-2003, 11:26 AM
I have confirmed w/ the SA team that this feature is not enabled because of performance reasons.


[b]quote:Originally posted by Jason

I use the syntax Request.ServerVariables("REMOTE_HOST")

It gives an IP address, rather than a DNS lookup.

See http://support.microsoft.com:80/support/kb/articles/Q245/5/74.ASP
</blockquote id="quote"></font id="quote">

hossrod
12-29-2003, 04:41 AM
I know bruce says in this thread that this feature is disabled, but it seems to be working for me.

Here is my code:

<%
Set DNSLook = Server.CreateObject("AspDNS.Lookup")
strRes = DNSLook.ReverseDNSLookup ("someIP")
%>
Your Domain: <% =strRes %></font id="maroon">


[b]quote:Originally posted by Jason

I can't get Reverse DNS Lookup to work. I assume that it must be disabled on the discountasp servers. Is there any chance of this feature being enabled?
</blockquote id="quote"></font id="quote">

Jason
12-30-2003, 05:14 AM
Thanks - I'll try using that syntax :)

hossrod
12-31-2003, 09:54 AM
You can see it in action at the bottom of my web pages at www.hossweb.com (http://www.hossweb.com). This is using the exact code I posted except that I have Request.ServerVariables("REMOTE_HOST") in place of "SomeIP".

[b]quote:Originally posted by Jason

Thanks - I'll try using that syntax :)
</blockquote id="quote"></font id="quote">

Jason
04-29-2004, 12:27 AM
It works perfectly - thanks :)

bruce
04-29-2004, 01:40 AM
I guess it's not disabled [:)]

[b]quote:Originally posted by Jason

It works perfectly - thanks :)
</blockquote id="quote"></font id="quote">

Malin
05-20-2004, 12:12 AM
How can I translate:

Set DNSLook = Server.CreateObject("AspDNS.Lookup")
strRes = DNSLook.ReverseDNSLookup(Request.ServerVariables("REMOTE_HOST"))

---------------

to asp.NET

I cant figure it out.. have been trying for a while now [|)]

Malin

diltonm
06-27-2004, 02:01 AM
This functionality is actually built into .NET. Here is one way to do this:

string sRemoteHostName = Dns.Resolve(Request.UserHostAddress).HostName;
Response.Write(sRemoteHostName);

[8D]