Can we find out IP address?

Discussion in 'ASP .Net' started by =?Utf-8?B?QW5kcmV3?=, Mar 17, 2006.

  1. Hi, guys,

    Do we have a .net function to find out what is the IP address of IIS server?

    Thanks.
    =?Utf-8?B?QW5kcmV3?=, Mar 17, 2006
    #1
    1. Advertising

  2. =?Utf-8?B?QW5kcmV3?=

    Winista Guest

    Winista, Mar 17, 2006
    #2
    1. Advertising

  3. =?Utf-8?B?QW5kcmV3?=, Mar 17, 2006
    #3
  4. That sounds unnecessarily complicated.

    Just use :

    Request.UserHostAddress.ToString()
    or
    Request.ServerVariables("REMOTE_ADDR")



    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/
    ===================================
    "Winista" <> wrote in message news:%...
    > See if this helps..
    >
    > http://www.netomatix.com/machineip.aspx
    >
    >
    > --
    > Netomatix
    > http://www.netomatix.com
    > "Andrew" <> wrote in message
    > news:...
    >> Hi, guys,
    >>
    >> Do we have a .net function to find out what is the IP address of IIS server?
    >>
    >> Thanks.

    >
    >
    Juan T. Llibre, Mar 17, 2006
    #4
  5. If you look for the application host, you can use

    Request.Url.Host

    If you look for requester's IP, use

    Request.UserHostAddress (if the request comes through a proxy server, you
    might need Request.ServerVariables["HTTP_X_FORWARDED_FOR"])

    HTH

    Elton Wang



    "Andrew" wrote:

    > Hi, guys,
    >
    > Do we have a .net function to find out what is the IP address of IIS server?
    >
    > Thanks.
    =?Utf-8?B?RWx0b24gVw==?=, Mar 18, 2006
    #5
    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. UJ
    Replies:
    2
    Views:
    710
  2. UJ
    Replies:
    4
    Views:
    701
    John Rivers
    Sep 2, 2005
  3. Daniel Czajko
    Replies:
    3
    Views:
    13,438
    kesahey
    Oct 21, 2009
  4. Replies:
    11
    Views:
    832
    Keith Thompson
    May 18, 2006
  5. Koen Hoorelbeke

    is it possible for a webservice to find out the ip-address from ..

    Koen Hoorelbeke, Sep 24, 2004, in forum: ASP .Net Web Services
    Replies:
    1
    Views:
    97
    Kenneth Ellested
    Sep 24, 2004
Loading...

Share This Page