Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > IP address

Reply
Thread Tools

IP address

 
 
David
Guest
Posts: n/a
 
      11-28-2003
Hi
I'm trying to get remote ip address and local ip address
of the user (i.e. machine name) but i couldnt find out it.
however i can see the public remote ip address.here is
the little code that i have written..

<%
For Each Item in Request.ServerVariables %>
<tr>
<td><%= Item %></td>
<td><%=Request.ServerVariables(Item)%></td>
</tr>
<%
Next
%>

Any help would be appreciated...
Thanx in advance...
David
 
Reply With Quote
 
 
 
 
Ken Schaefer
Guest
Posts: n/a
 
      11-28-2003
You can't get the "machine name" using just the Request.ServerVariables()
collection. The browser never sends the machine name to your webserver.

Cheers
Ken


"David" <(E-Mail Removed)> wrote in message
news:091b01c3b54f$741394b0$(E-Mail Removed)...
: Hi
: I'm trying to get remote ip address and local ip address
: of the user (i.e. machine name) but i couldnt find out it.
: however i can see the public remote ip address.here is
: the little code that i have written..
:
: <%
: For Each Item in Request.ServerVariables %>
: <tr>
: <td><%= Item %></td>
: <td><%=Request.ServerVariables(Item)%></td>
: </tr>
: <%
: Next
: %>
:
: Any help would be appreciated...
: Thanx in advance...
: David


 
Reply With Quote
 
 
 
 
Bhaskardeep Khaund
Guest
Posts: n/a
 
      11-30-2003
Hi, you can use

ip = Request.ServerVariables("REMOTE_ADDR")

you can get the server name as:-

servername = Request.ServerVariables("SERVER_NAME")

Hope this helps

Regards
Bhaskardeep Khaund

"Ken Schaefer" <(E-Mail Removed)> wrote in message news:#(E-Mail Removed)...
You can't get the "machine name" using just the Request.ServerVariables()
collection. The browser never sends the machine name to your webserver.

Cheers
Ken


"David" <(E-Mail Removed)> wrote in message
news:091b01c3b54f$741394b0$(E-Mail Removed)...
: Hi
: I'm trying to get remote ip address and local ip address
: of the user (i.e. machine name) but i couldnt find out it.
: however i can see the public remote ip address.here is
: the little code that i have written..
:
: <%
: For Each Item in Request.ServerVariables %>
: <tr>
: <td><%= Item %></td>
: <td><%=Request.ServerVariables(Item)%></td>
: </tr>
: <%
: Next
: %>
:
: Any help would be appreciated...
: Thanx in advance...
: David


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
VPN with DMZ IP address NETed to LAN IP address!!! route-map!!! examples20001@gmail.com Cisco 0 02-07-2006 04:05 PM
PIX Firewall MAC address VPN IP address Julian Dragut Cisco 1 02-07-2006 07:57 AM
obtaining the IP ADDRESS of an IP POHNE by its MAC ADDRESS ProgDario Cisco 17 05-06-2005 02:32 PM
Routing to public IP of NAT address from internal NAT address Andrew Albert Cisco 1 02-08-2005 07:05 PM
Re: Hide Address Bar or Encrypt Address?? avnrao ASP .Net 1 05-04-2004 03:46 PM



Advertisments