Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Mar 03, 2011 03:57 AM by prakash.radhwani
Jun 26, 2008 05:53 AM|LINK
It worked for me
Oct 20, 2008 05:58 AM|LINK
Hi! Thanks for the post.. It works! [Yes]
But how about getting the default gateway?
Thanks in advance!
Oct 23, 2008 06:15 AM|LINK
I happy that such code is well doing but one problem arise when Client(Under Proxy server) who access my application return the Proxy server IP.U have some code to Find the IP Address of client run under Proxy server.
Nov 07, 2008 06:07 AM|LINK
Hi All i have same problem,after read this post i got the IP address, then i want to get the time zone of the Ip Address.how to get the timezone of the particular IP address..
Thanks in Advance,
Nov 10, 2008 06:41 AM|LINK
>I want to get the time zone of the Ip Address.how to get the timezone of the particular IP
IP Address is frequently wrong even on country let alone Time Zone within a country. Whilst being in the UK, I have been told that according to my IP address one time I was in Germany and another in the US. Given the way IP address blocks are allocated
to an Internet Service Provider, it is quite lilely that a national ISP in the US willl have users from a different time zone to where that block is registered.
Nov 10, 2008 02:48 PM|LINK
GeoByte is providing good services like these.......
following link may help you
Nov 14, 2008 01:15 PM|LINK
Good Post but I want to removed the domain and only keep the host name eg
I only want Q1111.
My code that returns the Q1111.xxxxx.xx.xx.xx is on page load as follows:
lbl_NetBiosNameDetail.Text = HostIP.HostName;
Can anyone assist?
Nov 14, 2008 01:26 PM|LINK
I will write you some code for you, once I clarify what you require. You cited
IP addresses have four components, but you show 5.
However you may like to go to
http://www.codeplex.com/IPAddressExtensions and try the IP Extensions project.
Nov 14, 2008 01:37 PM|LINK
This is not the IP Address but the computer name Q1111.
The rest of the xxxx.xxx.xx is the environment.
Nov 14, 2008 01:58 PM|LINK
Here is the function plus some unit test code
#region " Copyleft "
// Copyright (C) 2008 Clive Chinery
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
public class IpAddressTest
/// Test GetBlock1
public void GetBlock1Test1()
/// Test GetBlock1
public void GetBlock1Test2()
/// Get Block 1
/// <param name="input">IP Address</param>
/// <returns>Block 1</returns>
public string GetBlock1(string input)
var work = (string.Empty + input).Split('.');
if (work.Length != 4)
throw new ArgumentException("input is not in form xxx.xxx.xxx.xxx");