> One option is Request.ServerVariables["SCRIPT_NAME"];
Hello,
Do you know how to get the ip address in text format i.e
www.helloworld.com rather than 10.10.10.10
I know about those
sw.WriteLine(Request.ServerVariables("REMOTE_ADDR"))
sw.WriteLine(Request.ServerVariables("HTTP_REFERER"))
sw.WriteLine(Request.ServerVariables("HTTP_X_FORWARDED_FOR"))
sw.WriteLine(Request.ServerVariables("REMOTE_HOST"))
but all I get is ip address in the "number" format
Patrice - 25 Jul 2007 13:16 GMT
See System.Net.Dns to resolve the address (it can be done at the IIS level
but with some additional cost for *each* request).
As the example looks like a web site if you want the name of the site your
code is running this is Request.ServerVariables("SERVER_NAME") (likely
exposed in a friendly way by ASP.NET by a property such as
Request.Server.Name or something similar)
--
Patrice
>> One option is Request.ServerVariables["SCRIPT_NAME"];
>
[quoted text clipped - 10 lines]
>
> but all I get is ip address in the "number" format