Retrieving Server IP Address

Results 1 to 2 of 2

Thread: Retrieving Server IP Address

  1. #1
    Join Date
    Dec 1969

    Default Retrieving Server IP Address

    Hi,<BR><BR>I&#039;m hosting a server on my laptop for a project. The IP address changes depending on where I plug in onto the Internet. For one of my applications, I would need to retrieve the current IP address of my laptop. However when I use the Request.ServerVariables("SERVER_NAME") command, it returns either "localhost" or "" which is the loop back IP,instead of what I want.<BR><BR>Is there anyway I can retrieve the actual IP address, either by ASP or otherwise?<BR><BR>Thanks!<BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Retrieving Server IP Address

    actually the asp page gives you the correct result. For the ASP point of view the IP-adress *is* <BR><BR>I think you should do request.servervariables("REMOTE_ADDR") that gives you the IP adress of the laptop when you access an ASP page hosted on the laptop with the laptop. But I&#039;m not really sure if it works. Hmm, beginning to think about it I think it won&#039;t work, but doesn&#039;t hurt to try does it ;-)<BR><BR>Otherwise you could always use ping [laptopname] from the commandprompt. There are even ways to do this from ASP (check the faqs)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts