Ask a Question related to ASP.NET General, Design and Development.
-
Greg Low \(MVP\) #1
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
-
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"... -
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... -
[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?... -
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... -
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 -
Konrad #2
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
-
Edwin Kusters #3
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...of> 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>> > 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
-
Konrad #4
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...looking> 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 areand> 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...> of> > 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> > > addresses. In the example above, I've assumed there is at least one>> >> > > 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
-
Edwin Kusters #5
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...System.Net.Dns.GetHostByName(localHostName).Addres sList(0).ToString()> 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...> looking> > 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> > 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 =
> > > >array> > > >
> > > > Keep in mind that the GetHostByName function actually returns an> and> > of> > > > addresses. In the example above, I've assumed there is at least one>> >> > > > 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



Reply With Quote

