Finding out actual TCP/IP address

Discussion in 'ASP .Net Web Services' started by UJ, Aug 27, 2006.

  1. UJ

    UJ Guest

    Is there any way for a web service to find out what the TCP/IP address was
    that was used to 'call in' to it? I have a C# program that's calls to a web
    service and I want the web service to know the actual TCP/IP address that
    was used. If I get it from the machine and send it to the webservice via the
    program and you are behind a firewall/gateway/hub, you don't get the real
    web address. I'd like the real honest to goodness TCP/IP address.

    Any ideas?

    TIA - Jeff.
     
    UJ, Aug 27, 2006
    #1
    1. Advertising

  2. "UJ" <> wrote in message
    news:...
    > Is there any way for a web service to find out what the TCP/IP address was
    > that was used to 'call in' to it? I have a C# program that's calls to a
    > web service and I want the web service to know the actual TCP/IP address
    > that was used. If I get it from the machine and send it to the webservice
    > via the program and you are behind a firewall/gateway/hub, you don't get
    > the real web address. I'd like the real honest to goodness TCP/IP address.


    Sorry, it can't be done.

    John
     
    John Saunders, Aug 28, 2006
    #2
    1. Advertising

  3. "UJ" <> wrote in message
    news:...
    > Is there any way for a web service to find out what the TCP/IP address was
    > that was used to 'call in' to it? I have a C# program that's calls to a
    > web service and I want the web service to know the actual TCP/IP address
    > that was used. If I get it from the machine and send it to the webservice
    > via the program and you are behind a firewall/gateway/hub, you don't get
    > the real web address. I'd like the real honest to goodness TCP/IP address.


    Let me amend my previous reply.

    It can be done - if you ask the client to give you its IP address. But you
    can't just get it from the network.

    John
     
    John Saunders, Aug 28, 2006
    #3
  4. UJ

    UJ Guest

    John,
    If I get the TCP/IP address at the client end, it will get the local TCP/IP
    address right (behind firewall, ....) ? Not the one that it's using over the
    network right?

    TIA - Jeff.

    "John Saunders" <john.saunders at trizetto.com> wrote in message
    news:...
    > "UJ" <> wrote in message
    > news:...
    >> Is there any way for a web service to find out what the TCP/IP address
    >> was that was used to 'call in' to it? I have a C# program that's calls to
    >> a web service and I want the web service to know the actual TCP/IP
    >> address that was used. If I get it from the machine and send it to the
    >> webservice via the program and you are behind a firewall/gateway/hub, you
    >> don't get the real web address. I'd like the real honest to goodness
    >> TCP/IP address.

    >
    > Let me amend my previous reply.
    >
    > It can be done - if you ask the client to give you its IP address. But you
    > can't just get it from the network.
    >
    > John
    >
    >
     
    UJ, Aug 28, 2006
    #4
  5. "UJ" <> wrote in message
    news:...
    > John,
    > If I get the TCP/IP address at the client end, it will get the local
    > TCP/IP address right (behind firewall, ....) ? Not the one that it's using
    > over the network right?


    Right. And that's as much the "real" IP address as any you're likely to get.

    Whether this is useful to you depends on what you're trying to do. If you're
    trying to uniquely identify the client, IP address isn't a good way to do
    that, as it can change.

    John
     
    John Saunders, Aug 28, 2006
    #5
  6. UJ

    Heron Guest

    this.Context.Request.UserHostAddress

    ....this maybe, just guessing here :)



    "John Saunders" <john.saunders at trizetto.com> schreef in bericht
    news:ORZr%...
    > "UJ" <> wrote in message
    > news:...
    >> John,
    >> If I get the TCP/IP address at the client end, it will get the local
    >> TCP/IP address right (behind firewall, ....) ? Not the one that it's
    >> using over the network right?

    >
    > Right. And that's as much the "real" IP address as any you're likely to
    > get.
    >
    > Whether this is useful to you depends on what you're trying to do. If
    > you're trying to uniquely identify the client, IP address isn't a good way
    > to do that, as it can change.
    >
    > John
    >
    >
     
    Heron, Aug 30, 2006
    #6
  7. "Heron" <> wrote in message
    news:...
    > this.Context.Request.UserHostAddress
    >
    > ...this maybe, just guessing here :)


    Did you read the thread? That property will return the address of the
    firewall, NAT box or other Network-layer device. It will not, in general,
    return you something of value, depending on what "value" you want. This
    value will not be much good at identifying a particular PC if all the PCs in
    the company access the Internet through the same firewall, so that they all
    have the same address.

    John


    > "John Saunders" <john.saunders at trizetto.com> schreef in bericht
    > news:ORZr%...
    >> "UJ" <> wrote in message
    >> news:...
    >>> John,
    >>> If I get the TCP/IP address at the client end, it will get the local
    >>> TCP/IP address right (behind firewall, ....) ? Not the one that it's
    >>> using over the network right?

    >>
    >> Right. And that's as much the "real" IP address as any you're likely to
    >> get.
    >>
    >> Whether this is useful to you depends on what you're trying to do. If
    >> you're trying to uniquely identify the client, IP address isn't a good
    >> way to do that, as it can change.
    >>
    >> John
    >>
    >>

    >
    >
     
    John Saunders, Aug 30, 2006
    #7
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Earl Teigrob
    Replies:
    2
    Views:
    439
    Earl Teigrob
    Jun 9, 2004
  2. UJ
    Replies:
    2
    Views:
    748
  3. Tiger
    Replies:
    5
    Views:
    1,000
    Dave Thompson
    May 1, 2006
  4. Replies:
    5
    Views:
    359
    James Mills
    Oct 24, 2008
  5. Adam The Generic

    Finding out the users IP Address behind NAT

    Adam The Generic, Feb 20, 2009, in forum: ASP .Net
    Replies:
    8
    Views:
    3,067
    Flapper1112
    Apr 9, 2009
Loading...

Share This Page