Thanks guys, I was hoping to find the requested public IP address in the
Request object somewhere, but apparently it is not to be found.
However gathering the response from
http://www.whatismyip.org/ might just
work after all.
I am running a workstation that is behind a Gateway Firewall device and it
uses NAT. When I click on the whatismyip link above I get the public IP
Address that I must use to connect to my workstation from home via RDP
(using a non-standard Port of course).
So if I am getting the Public IP of a NATed workstation, why wouldn't that
technique work for a NATed Web Server...it's just another box? In fact any
response from another public site can ONLY return the public IP address of a
NATed box. Brilliant!
I am going brain-dead today because I can't even recall how to get the
HttpResponse returned from something like:
http://www.whatismyip.org/ in my
code-behind or maybe in the Global.asax itself.
I will resort to hard-coding the IP Address in web.config or global.asax if
necessary, as that is not too difficult, but I see possibly 30 or more
deployments that might need this sort of thing.
Thanks again...you guys are always helpful.
"Mark Rae [MVP]" <mark@markNOSPAMrae.netwrote in message
news:uq9bet44IHA.1952@TK2MSFTNGP03.phx.gbl...
Quote:
"John Kotuby" <jkotuby75@comcast.netwrote in message
news:eVYboS44IHA.4272@TK2MSFTNGP03.phx.gbl...
>
Quote:
>What I am really looking for is the Public IP Address that is used in the
>request to get to the Router that then finds the Server behind the
>firewall.
>
Hmm - if the box was connected to the Internet, it would be simple enough
to fetch its IP address as seen by the outside world by inspecting the
HttpResponse returned from something like:
http://www.whatismyip.org/
>
However, as Bruce has explained, because of the NAT and firewall in the
equation it's going to be pretty much impossible to determine this in this
case...
>
>
--
Mark Rae
ASP.NET MVP
http://www.markrae.net