Connecting Tech Pros Worldwide Help | Site Map

IP address

Progman
Guest
 
Posts: n/a
#1: Mar 30 '06
How do you get the IP address of a computer using ASP.net?


Juan T. Llibre
Guest
 
Posts: n/a
#2: Mar 30 '06

re: IP address


The server's IP address or the client's IP address ?



Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en espaņol : http://asp.net.do/foros/
===================================
"Progman" <adfawefqw@hotmail.com> wrote in message news:kXUWf.16691$F84.81526@weber.videotron.net...[color=blue]
> How do you get the IP address of a computer using ASP.net?
>[/color]


MattB
Guest
 
Posts: n/a
#3: Mar 30 '06

re: IP address


Progman wrote:[color=blue]
> How do you get the IP address of a computer using ASP.net?
>
>[/color]

Assuming you mean a client computer, it's:

Request.ServerVariables("REMOTE_ADDR")

HTH,
Matt
Karl Seguin [MVP]
Guest
 
Posts: n/a
#4: Mar 30 '06

re: IP address


If you mean the client browsing to your site, try Request.UserHostAddress

Karl

--
http://www.openmymind.net/
http://www.fuelindustries.com/


"Progman" <adfawefqw@hotmail.com> wrote in message
news:kXUWf.16691$F84.81526@weber.videotron.net...[color=blue]
> How do you get the IP address of a computer using ASP.net?
>[/color]


Bruce Barker
Guest
 
Posts: n/a
#5: Mar 30 '06

re: IP address


note: this is usually the nat'd (proxy servers) address not the real address


-- bruce (sqlwork.com)


"MattB" <somedudeus@yahoo.com> wrote in message
news:492l4hFmn0fiU2@individual.net...[color=blue]
> Progman wrote:[color=green]
>> How do you get the IP address of a computer using ASP.net?[/color]
>
> Assuming you mean a client computer, it's:
>
> Request.ServerVariables("REMOTE_ADDR")
>
> HTH,
> Matt[/color]


Progman
Guest
 
Posts: n/a
#6: Mar 30 '06

re: IP address


I get
Request for the permission of type
'System.Security.Permissions.UIPermission, mscorlib, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

WHY?

"Karl Seguin [MVP]" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME
net> wrote in message news:OAqSdSCVGHA.1204@TK2MSFTNGP12.phx.gbl...[color=blue]
> If you mean the client browsing to your site, try Request.UserHostAddress
>
> Karl
>
> --
> http://www.openmymind.net/
> http://www.fuelindustries.com/
>
>
> "Progman" <adfawefqw@hotmail.com> wrote in message
> news:kXUWf.16691$F84.81526@weber.videotron.net...[color=green]
>> How do you get the IP address of a computer using ASP.net?
>>[/color]
>
>[/color]


sirfunusa
Guest
 
Posts: n/a
#7: Mar 30 '06

re: IP address


Why not. What are you talking about. We are not mind readers. What code
causes this error??

Closed Thread