Welcome to WebmasterWorld Guest from 18.104.22.168
Forum Moderators: ocean10000
Dim strReverseDNS As String = ""
strReverseDNS = System.Net.Dns.GetHostByAddress(Request.ServerVariables("REMOTE_ADDR")).HostName
Catch exc As Exception
strReverseDNS = Request.ServerVariables("REMOTE_ADDR")
It is VERY important to keep this in the Try/Catch block as there is a coding error in the .Net Framework which will error out if the IP address is xx.xx.x x x.x x x
Because you are using static html pages, you'll need to place this code in the global.asax file which needs to reside in your root application directory. If you don't have one, you will need to add it in.
Here's a good article on creating one and the different events that can get fired from inside of it:
You'll want to place your reverse dns code in the "Application_BeginRequest" sub.
setting up the global.asax file and running my static pages through it unfortunately doesn't want to work after a period of time the web server grinds to a holt and we have to restart, we do have fairly high traffic website would this be the reason or can you think of something that i might have messed up.
[edited by: Vimes at 10:13 am (utc) on Dec. 14, 2007]