How to capture Clients IP?

Discussion in 'ASP .Net' started by Petrucci2000, Dec 1, 2003.

  1. Petrucci2000

    Petrucci2000 Guest

    Hi All, How can you capture a clients IP Address when they are using DHCP
    Protocol? Request.UserHostAddress doesn't works!!!


    TIA
    Petrucci2000, Dec 1, 2003
    #1
    1. Advertising

  2. look in the servervariables collection

    --
    Regards

    John Timney (Microsoft ASP.NET MVP)
    ----------------------------------------------
    <shameless_author_plug>
    Professional .NET for Java Developers with C#
    ISBN:1-861007-91-4
    Professional Windows Forms
    ISBN: 1861005547
    Professional JSP 2nd Edition
    ISBN: 1861004958
    Professional JSP
    ISBN: 1861003625
    Beginning JSP Web Development
    ISBN: 1861002092
    </shameless_author_plug>
    ----------------------------------------------

    "Petrucci2000" <> wrote in message
    news:...
    > Hi All, How can you capture a clients IP Address when they are using DHCP
    > Protocol? Request.UserHostAddress doesn't works!!!
    >
    >
    > TIA
    >
    >
    John Timney \(Microsoft MVP\), Dec 1, 2003
    #2
    1. Advertising

  3. Petrucci2000

    KLomax Guest

    Try this...

    Dim sX as string
    Try
    sX = Request.ServerVariables("LOCAL_ADDR")
    Catch
    sX = ""
    End Try



    >-----Original Message-----
    >Hi All, How can you capture a clients IP Address when

    they are using DHCP
    >Protocol? Request.UserHostAddress doesn't works!!!
    >
    >
    >TIA
    >
    >
    >.
    >
    KLomax, Dec 1, 2003
    #3
  4. Request.ServerVariables("REMOTE_ADDR")
    This should give you the IP address of the computer making the request.

    --
    I hope this helps,
    Steve C. Orr, MCSD, MVP
    http://Steve.Orr.net
    Hire top-notch developers at http://www.able-consulting.com



    "Petrucci2000" <> wrote in message
    news:...
    > Hi All, How can you capture a clients IP Address when they are using DHCP
    > Protocol? Request.UserHostAddress doesn't works!!!
    >
    >
    > TIA
    >
    >
    Steve C. Orr [MVP, MCSD], Dec 1, 2003
    #4
    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. Eli Sidwell
    Replies:
    7
    Views:
    2,682
    Gavin Williams
    Jun 24, 2004
  2. trevor oakley

    ASP.NET Data Source - Clients/Web Server

    trevor oakley, Jun 26, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    931
    Natty Gur
    Jun 26, 2003
  3. Ersin Gençtürk
    Replies:
    4
    Views:
    565
    Ersin Gençtürk
    Jun 30, 2003
  4. Max
    Replies:
    7
    Views:
    9,083
  5. Francesco
    Replies:
    1
    Views:
    518
    =?ISO-8859-1?Q?Arne_Vajh=F8j?=
    Dec 27, 2006
Loading...

Share This Page