Reverse DNS Lookup

Discussion in 'Hosting Services / Control Panel' started by Jason, Nov 21, 2003.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. 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?
     
  2. Bruce

    Bruce DiscountASP.NET Staff

    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
    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">
     
  3. Bruce

    Bruce DiscountASP.NET Staff

    I have confirmed w/ the SA team that this feature is not enabled because of performance reasons.


    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">
     
  4. 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">


    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">
     
  5. Thanks - I'll try using that syntax :)
     
  6. You can see it in action at the bottom of my web pages at www.hossweb.com. This is using the exact code I posted except that I have Request.ServerVariables("REMOTE_HOST") in place of "SomeIP".

    quote:Originally posted by Jason

    Thanks - I'll try using that syntax :)
    </blockquote id="quote"></font id="quote">
     
  7. It works perfectly - thanks :)
     
  8. Bruce

    Bruce DiscountASP.NET Staff

    I guess it's not disabled [:)]

    quote:Originally posted by Jason

    It works perfectly - thanks :)
    </blockquote id="quote"></font id="quote">
     
  9. 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
     
  10. 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]
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page