Ask a Question related to ASP.NET General, Design and Development.

  1. #1

    Default Re: server's ip

    Hi Konrad,

    There are a variety of ways. One is:
    Dim localHostName As String =
    System.Net.Dns.GetHostByName("").HostName.ToString ()

    Dim localIPAddress As String =
    System.Net.Dns.GetHostByName(localHostName).Addres sList(0).ToString()

    Keep in mind that the GetHostByName function actually returns an array of
    addresses. In the example above, I've assumed there is at least one and
    that's the only one I've returned.

    HTH,

    --
    Greg Low (MVP)
    MSDE Manager SQL Tools
    [url]www.whitebearconsulting.com[/url]

    "Konrad" <konrad007@poczta.onet.pl> wrote in message
    news:ber6cu$28k$1@nemesis.news.tpi.pl...
    > Hi
    >
    > How to find my servers IP.
    >
    > Thanks
    > Konrad
    >
    >

    Greg Low \(MVP\) Guest

  2. Similar Questions and Discussions

    1. Check another server's certficate from asp.net Code behind
      I have an asp.net program that needs to request info from another server but authenticate that other server certificate to ensure an "unauthroized"...
    2. Accessing the server's registry in an ASP.Net Web Service...
      I've found this article on how to get ASP.Net to read/write from the server's registry, but it got heavily critted as being something that you...
    3. [PHP] Validate The Last Day of Month with server's clock????
      Alright, interesting thought, never thought it would be possible. So, what would the PHP script be when matching it against the clock or something?...
    4. SQL Server's 'form server'
      I am working on an internet-based project. I select SQL Server as its database DBMS. But as Oracle can provide a tool called 'develope server, form...
    5. Is there any equivalent of Sql Server's temporary table in Oracle
      On Thu, 05 Dec 2002, gamaz@eathlink.net wrote: Let Oracle do the temporary set building. You code the join. -- Galen Boyer
  3. #2

    Default Re: server's ip

    I'am looking for my IIS IP not intranet IP.
    Thanks
    Konrad

    "Greg Low (MVP)" <greglow@lowell.com.au> wrote in message
    news:ukhXtXTSDHA.1720@TK2MSFTNGP12.phx.gbl...
    > Hi Konrad,
    >
    > There are a variety of ways. One is:
    > Dim localHostName As String =
    > System.Net.Dns.GetHostByName("").HostName.ToString ()
    >
    > Dim localIPAddress As String =
    > System.Net.Dns.GetHostByName(localHostName).Addres sList(0).ToString()
    >
    > Keep in mind that the GetHostByName function actually returns an array of
    > addresses. In the example above, I've assumed there is at least one and
    > that's the only one I've returned.
    >
    > HTH,
    >
    > --
    > Greg Low (MVP)
    > MSDE Manager SQL Tools
    > [url]www.whitebearconsulting.com[/url]
    >
    > "Konrad" <konrad007@poczta.onet.pl> wrote in message
    > news:ber6cu$28k$1@nemesis.news.tpi.pl...
    > > Hi
    > >
    > > How to find my servers IP.
    > >
    > > Thanks
    > > Konrad
    > >
    > >
    >
    >

    Konrad Guest

  4. #3

    Default Re: server's ip

    Konrad,

    Your question is still not clear to me but are you looking for:
    Request.ServerVariables.Get("LOCAL_ADDR") ?

    If not then you should try to be a bit more explicit in what you are looking
    for, from which context and from what machine you are trying to find it.
    It's mostly guessing now.

    Regards,

    Edwin Kusters

    Hot ITem Informatica



    "Konrad" <konrad007@poczta.onet.pl> wrote in message
    news:berkg1$een$1@nemesis.news.tpi.pl...
    > I'am looking for my IIS IP not intranet IP.
    > Thanks
    > Konrad
    >
    > "Greg Low (MVP)" <greglow@lowell.com.au> wrote in message
    > news:ukhXtXTSDHA.1720@TK2MSFTNGP12.phx.gbl...
    > > Hi Konrad,
    > >
    > > There are a variety of ways. One is:
    > > Dim localHostName As String =
    > > System.Net.Dns.GetHostByName("").HostName.ToString ()
    > >
    > > Dim localIPAddress As String =
    > > System.Net.Dns.GetHostByName(localHostName).Addres sList(0).ToString()
    > >
    > > Keep in mind that the GetHostByName function actually returns an array
    of
    > > addresses. In the example above, I've assumed there is at least one and
    > > that's the only one I've returned.
    > >
    > > HTH,
    > >
    > > --
    > > Greg Low (MVP)
    > > MSDE Manager SQL Tools
    > > [url]www.whitebearconsulting.com[/url]
    > >
    > > "Konrad" <konrad007@poczta.onet.pl> wrote in message
    > > news:ber6cu$28k$1@nemesis.news.tpi.pl...
    > > > Hi
    > > >
    > > > How to find my servers IP.
    > > >
    > > > Thanks
    > > > Konrad
    > > >
    > > >
    > >
    > >
    >
    >

    Edwin Kusters Guest

  5. #4

    Default Re: server's ip

    Thanks. This is what I was lookink for.

    "Edwin Kusters" <NOSPAMeksnews@xs4all.nl> wrote in message
    news:#BJ6MMYSDHA.2236@tk2msftngp13.phx.gbl...
    > Konrad,
    >
    > Your question is still not clear to me but are you looking for:
    > Request.ServerVariables.Get("LOCAL_ADDR") ?
    >
    > If not then you should try to be a bit more explicit in what you are
    looking
    > for, from which context and from what machine you are trying to find it.
    > It's mostly guessing now.
    >
    > Regards,
    >
    > Edwin Kusters
    >
    > Hot ITem Informatica
    >
    >
    >
    > "Konrad" <konrad007@poczta.onet.pl> wrote in message
    > news:berkg1$een$1@nemesis.news.tpi.pl...
    > > I'am looking for my IIS IP not intranet IP.
    > > Thanks
    > > Konrad
    > >
    > > "Greg Low (MVP)" <greglow@lowell.com.au> wrote in message
    > > news:ukhXtXTSDHA.1720@TK2MSFTNGP12.phx.gbl...
    > > > Hi Konrad,
    > > >
    > > > There are a variety of ways. One is:
    > > > Dim localHostName As String =
    > > > System.Net.Dns.GetHostByName("").HostName.ToString ()
    > > >
    > > > Dim localIPAddress As String =
    > > > System.Net.Dns.GetHostByName(localHostName).Addres sList(0).ToString()
    > > >
    > > > Keep in mind that the GetHostByName function actually returns an array
    > of
    > > > addresses. In the example above, I've assumed there is at least one
    and
    > > > that's the only one I've returned.
    > > >
    > > > HTH,
    > > >
    > > > --
    > > > Greg Low (MVP)
    > > > MSDE Manager SQL Tools
    > > > [url]www.whitebearconsulting.com[/url]
    > > >
    > > > "Konrad" <konrad007@poczta.onet.pl> wrote in message
    > > > news:ber6cu$28k$1@nemesis.news.tpi.pl...
    > > > > Hi
    > > > >
    > > > > How to find my servers IP.
    > > > >
    > > > > Thanks
    > > > > Konrad
    > > > >
    > > > >
    > > >
    > > >
    > >
    > >
    >
    >

    Konrad Guest

  6. #5

    Default Re: server's ip

    It return the loopback when you goto [url]http://localhost/somesite/somepage.aspx[/url]
    Will return your network ip if you do
    [url]http://machinename/somesite/somepage.aspx[/url]

    Basically it will hand you the ip the client (browser) is using to get to
    the server.

    Have to admit I have never looked at the result of this on single machine in
    a webfarm

    Regards,
    Edwin Kusters


    "Greg Low (MVP)" <greglow@lowell.com.au> wrote in message
    news:u%23MCbCgSDHA.2008@TK2MSFTNGP11.phx.gbl...
    > On my system, this returns 127.0.0.1 ie the loopback address. The one I
    > posted returned the address on the adapter...
    >
    > Regards,
    >
    >
    > --
    > Greg Low (MVP)
    > MSDE Manager SQL Tools
    > [url]www.whitebearconsulting.com[/url]
    >
    > "Edwin Kusters" <NOSPAMeksnews@xs4all.nl> wrote in message
    > news:%23BJ6MMYSDHA.2236@tk2msftngp13.phx.gbl...
    > > Konrad,
    > >
    > > Your question is still not clear to me but are you looking for:
    > > Request.ServerVariables.Get("LOCAL_ADDR") ?
    > >
    > > If not then you should try to be a bit more explicit in what you are
    > looking
    > > for, from which context and from what machine you are trying to find it.
    > > It's mostly guessing now.
    > >
    > > Regards,
    > >
    > > Edwin Kusters
    > >
    > > Hot ITem Informatica
    > >
    > >
    > >
    > > "Konrad" <konrad007@poczta.onet.pl> wrote in message
    > > news:berkg1$een$1@nemesis.news.tpi.pl...
    > > > I'am looking for my IIS IP not intranet IP.
    > > > Thanks
    > > > Konrad
    > > >
    > > > "Greg Low (MVP)" <greglow@lowell.com.au> wrote in message
    > > > news:ukhXtXTSDHA.1720@TK2MSFTNGP12.phx.gbl...
    > > > > Hi Konrad,
    > > > >
    > > > > There are a variety of ways. One is:
    > > > > Dim localHostName As String =
    > > > > System.Net.Dns.GetHostByName("").HostName.ToString ()
    > > > >
    > > > > Dim localIPAddress As String =
    > > > >
    System.Net.Dns.GetHostByName(localHostName).Addres sList(0).ToString()
    > > > >
    > > > > Keep in mind that the GetHostByName function actually returns an
    array
    > > of
    > > > > addresses. In the example above, I've assumed there is at least one
    > and
    > > > > that's the only one I've returned.
    > > > >
    > > > > HTH,
    > > > >
    > > > > --
    > > > > Greg Low (MVP)
    > > > > MSDE Manager SQL Tools
    > > > > [url]www.whitebearconsulting.com[/url]
    > > > >
    > > > > "Konrad" <konrad007@poczta.onet.pl> wrote in message
    > > > > news:ber6cu$28k$1@nemesis.news.tpi.pl...
    > > > > > Hi
    > > > > >
    > > > > > How to find my servers IP.
    > > > > >
    > > > > > Thanks
    > > > > > Konrad
    > > > > >
    > > > > >
    > > > >
    > > > >
    > > >
    > > >
    > >
    > >
    >
    >

    Edwin Kusters Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139