Dim objHttpRequest As HttpRequest
Dim objHttpContext As HttpContext
Dim FirewallIPAddress As String
objHttpContext = HttpContext.Current()
objHttpRequest = objHttpContext.Request
FirewallIPAddress = objHttpRequest.ServerVariables("REMOTE_HOST")
There it is. Just add it to the web service method.
"Ed Willis" <ed*******@acsi.orgnospam> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
How can you do it in a Web Service?
"Fred Nelson" <fr**@smartybird.com> wrote in message
news:ui*************@TK2MSFTNGP12.phx.gbl... Ed:
I have been able to do it with:
Request.ServerVariables.Item("REMOTE_HOST")
In web applications that I have written.
Hope that helps!
Fred
"Ed Willis" <ed*******@acsi.orgnospam> wrote in message
news:eZ**************@TK2MSFTNGP09.phx.gbl... We have several offices that have a DSL or Cable modem where the IP
address is dynamic and changes often. I created a VB app that obtains the IP
address but it obtains the IP address within the firewall and we need the
public IP address of the machine outside the firewall so we can use Remote
Desktop connection for problem resolution etc.
Here is my current code:
Dim myWorkstation As String = System.Net.Dns.GetHostName()
Dim IPAdress As String =
System.Net.Dns.Resolve(myWorkstation).AddressList( 0).ToString
Dim MachineName As String = Environment.MachineName
How can I obtain the other IP address?
Thanks.