How to get IP Address and ISP name (With county name) using C#

 Dear Freinds

I wanna know about getting IP address and ISP name of the user who get into my web site. Some one with the good detailed C# solution please reply me. If you have made any class for this purpose kindly share it with me. 

Thank You

.NET 3.5
11/27/2008 12:59:17 PM 93655 articles. 5 followers. Follow

1 Replies

Similar Articles

[PageSpeed] 28

 You can get the IP address using Server variables

string ip = HttpContext.Current.Request.ServerVariables["REMOTE_ADDR"];

or this 

string strHostName = System.Net.Dns.GetHostName();
string strIp = System.Net.Dns.GetHostAddresses(strHostName).GetValue(0).ToString();


For getting country name from IP read this article


Don't say thanks rather mark my reply as "Answer" if it helps you ,Doing so u'll get points too
amiT jaiN

C#.NET Articles
11/27/2008 1:36:03 PM

Similar Artilces:

Sending SMS using or using or
Hi  My requirement is I hav one csv file with these fields id,mobilenum,messgae,status.intiallu staus is 0. once i read the all fileds and take that mobile number.using tat mobile number  i need to send sms .after sending sms i shuld change status as 1 How to send sms thru coding (please dont provide any links.if it is provide also please give working links becox i checked codeproject .i didnt get any nice link. and also provide the how to update the status field im csv file   Thank ssandhya   To send SMS, you need some third party SMS providers. if you consul...

How to list all sqlserver names and database names in my network using
 Hai In my network I have 4 computers with sqlserver2000 installed, using C# code how can I list all the sqlservers in my network in a combobox and while selecting a server name how can I list all the databases in another comboboxThanks in advance Regards Anu Palavila Hope this helps.   Have a look at this: for the list of servers, once a server has been selected you need ...

How to get Hostname, IP address, port number, DB name, instance name using Query
As we know, normally we connect to a sybase server by just identifying the node name and interfaces file and necessary properties, but currently I want to get Host-name, IP address, port number, DB name, instance name of connected server out after connection created. Does any one how to use query to do so? Does sybase provide such functionality? Seems oracle can do so... If there is no query, does sybase provides any API which can implement this? Thanks! instance name: select @@servername [assumes the DBA has defined a local entry in syservers] db name: select db_name() [can...

Get client IP address [Not Host] in C# .NET web services
I create one web service using c# .net and in this web service I want to get an IP address for client. I check thousend of article but that is not working, let me give you one example System.Web.HttpContext.Current.Request.UserHostAddress; System.Web.HttpContext.Current.Request.ServerVariables["REMOTE_ADDR"]; This is gives me IP but that my server ip where I put my web service but I want to get my client IP address. Can someone help me with this. You can try: string ip; ip=Request.ServerVariables("HTTP_X_FORWARDED_FOR"); i...

use VB.NET and C#.NET code in the same C#.NET project
All-- Here is a sample that is "off the beaten path", (at least for me). Is it possible, in an ASP.NET application, using the code-behind page building technique, to have both pages written in VB.NET and pages written C#.NET?At there is a sample that shows that, (contrary to popular belief), it IS possible to mix ASP.NET pages built with C#.NET with ASP.NET pages built with VB.NET in the same VS.NET 2003 project. Note that this is just a "fun" sample to see if it can be done and I do not recommend this practice as a "standard" way of develo...

How to get datasource name dynamically from .txt / .xml file using 2.0 with Mysql 5.0
I am using C#.Net 2.0 With MySql 5.0. I created a project and it works fine in my machine. But problem occurs when i try to run the project other than my machine. I wrote datasource=mysystem name in connection string. Is it possible to get datasource name dynamically from a text file (*.txt) or from .xml file for MySql.Regards,Tamizhselvi  Add an App.Config file to your project and you can drop a connection string in there like so:  <connectionStrings>    <add name="PICK A NAME" connectionString="YOUR CONNECTION STRING"/>...

.Net 2.0 Web application using is unable to create object of another dll writen in C# .net 2.0
Hi, I habe created one web application using which is adding reference of dlls written in C# and .net 2.0. But whenever trying to create object of referencing dll, it is throwing error :Object reference does not set to an object. But, locally it is working fine,. In the server i have deployed the .aspx files and dll files in the bin. There were already an web.config in the server which is of .net 1.1. But checked it is retrieving value for that web.config correctly. Should i have to deply any other files and if not what can be the solution for this? Please help. Thanks, So...

hei guys, i need help on my application, i'm using C#.NET as front-ed and SQL as back-end, aside from a datagrid, i want to display my data using textboxes and not a datagrid, i can do it using Visual Basic 6 but since i'm a newbee at C#.NET i don't know how to do it, specially the codes, can anyone help me with it? thank you in advance! If you are doing windows development, i would suggest using 'DataForm wizard' (Use Solution Explorer-->Rightclick project-->Add new Item-->New DataForm). It will guide you through steps. If you are doing web apps. Use quickstart to learn them. h...

How to get new web app to use .NET 2.0 on Win2K server using .NET 1.1 as default framework?
I have .net framework1.1 and 2.0 on our server running win2K. i have existing applications that uses 1.1, i also have a new app that use 2.0.  how can i set my new .NET 2.0 app to point to 2.0 without messing up my existing .NET 1.1 apps? To specify the ASP .Net version fro a web application, do the followingIn IIS Manager select the web application -> Properties -> ASP.Net TabSelect  ASP.Net version you want to use for the applicationRegards,PrashantDont forget to click "Mark as Answer" on the post that helped you. But I am running Win2K...

used a to converter and am now getting a syntax error.
ok I used a cool utility at to convert some to and it spit out a bunch of code which almost works but I am getting a syntax error on this line Imports (StreamReader sr = Shadows Function)() As StreamReader(objResponse.GetResponseStream()) I tried it that way and also like Imports (StreamReader sr = Shadows Function)() As StreamReader(objResponse.GetResponseStream()) but either way gave the same error Compiler Error Message: BC30035: Syntax error. Source Error: Line 26: Line ...

How To Convert web template to Forms Template
I need  Convert web template to Forms Template   There are some free c# to vb converters out there which will allow you to upload a project and convert it to vb.   The programming models for windows forms and web projects are very different there is no way to convert a web to windows forms project.      Silverlight-helpVb TipsSpace Coast .Net User Group Hey Ajax-y, This tool really helps all programmers. I thought I would share this wit...

How to get a changed web form control name to use in javascript?
When you use a user control, all web form controls names get changed by .NET some like ctl0_ctl5_txtFirstName where txtFirstName is the actual name I gave. in Javascript, to refer to this control I can do like document.getElementById('ctl0_ctl5_txtFirstName') but the thing is from time to time, the prefix, in this case ctl0_ctl5_, gets changed again. So the javascript does not work anymore. Is there any way of handling this situation? Is there any server method to get the prefix? If then I can send the prefix to client side and prefix it with actuall control name like var ...

C#.NET in VS.NET vs. C# in Web Matrix
Hi all, I am very new to .NET ... I realized C#.NET is only available from Visual Studio.NET ... however, I realized Web Matrix also allowed us to choose C# as language but not C#.NET ... they are not the same, right? If not, then why it's in Web Matrix which runs ASP.NET?? If I need to run C#.Net, I MUST GET VS.NET, right? Can C#.NET has the abality to create chat program? Thank you very much. C#.NET and C# are the same thing. JimMS MVP ASP.NET [VC++/MFC emeritus]Old Dog Learns New TricksPreferred programming language: cuneiform on clay tablets So ... that means I can use web matrix t...

Get names of files ONLY using module Net::SFTP::Foreign
--=_alternative 00472E2AC1257341_= Content-Type: text/plain; charset="US-ASCII" Hi all, I am a newbie in this forum and Perl too ;-) I am trying writing script transfering files using module Net::SFTP::Foreign. I need to retrieve from remote directory only names of files (not directories, links,etc.). Something like this doesn't work: -------------- use strict; use warnings; use Net::SFTP::Foreign; my $remote_dir = "/tmp"; my $sftp = Net::SFTP::Foreign->new("host"); $sftp->error and print "SSH connection failed: &qu...

Showing my own column names instead of database column names in datagridview-windows app.
HiI already bind a DataGridView to a databse. My DataGridView is showing column names as it is in the table. I want to show user-friendly column names in the grid instead of column names in the database table. Please help me in this reagard. Thanx in advance Your statement indicates to me that your columns are dynamically added to the grid, that's why it's showing the database column names. You can show user-friendly column names by changing your query like so: SELECT fName as 'First Name' FROM Users.DarmarkMark as Answer, if this reply answers your post. Go to "E...

Web resources about - How to get IP Address and ISP name (With county name) using C# -

File:Ipv6 address.svg - Wikipedia, the free encyclopedia
I, the copyright holder of this work, release this work into the public domain . This applies worldwide. This file contains additional information, ...

State of the Union 2016: Barack Obama declares US should cure cancer in final address to Congress
US President Barack Obama is expected to urge American leaders fix our politics and lift standards of living in his final State of the Union ...

Missed President Obama's final State of the Union address? You can watch it on Amazon Prime
The State of the Union address is arguably the most important speech given by any president and what will be included in the context of it is ...

Lies and More Lies: Another Look at Obama's State of the Union Address
Lies and More Lies I commented on Obama's state of the union address in Brilliant Bullshit! Let's check out an alternative viewpoint. In the ...

Eye Opener at 8: Obama delivers final State of the Union address - Videos - CBS News
A look back at what we've been covering on "CBS This Morning."

'You Can't Manage What You Can't See': Cisco Helps Businesses Address Shadow IT
'You Can't Manage What You Can't See': Cisco Helps Businesses Address Shadow IT CNNMoney Shadow IT is rampant. For years, CIOs have known that ...

Why was Kim Davis at the State of the Union address?
The Liberty Counsel, which represents Ms. Davis, said she would attend the speech to oppose the Administration's 'trampling of religious liberty.' ...

Cuomo Talks $15 Minimum Wage During State Address
'Millions of low-wage workers have to choose between paying taxes and buying food'

In weekly address, Obama proposes employment insurance reforms
x YouTube Video President Obama used this week’s address to push to “modernize our employment insurance system.” If a hardworking American ...

President Obama Last State of the Union Address Recap Group Group
Trump is small potatoes. Obama had his sights set on bigger things last night.

Resources last updated: 1/17/2016 5:50:07 PM