.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Forum >> Windows Application >> Post New QuestionBookmark and Share Subscribe to Forum

How to get client ipaddress windows application

Posted By: priya     Posted Date: March 10, 2011    Points:5   Category :Windows Application
Hi,

How to get client ipaddress windows application using C#.

Thanks in advance
Priya

Responses
Author: Sunil Yadav       [Moderator]      
Posted Date: March 10, 2011     Points: 20   

Hi,

Check out the below code snippet.

string ipAddress=System.Net.Dns.GetHostEntry(System.Net.Dns.GetHostName()).AddressList[1].ToString()


Author: Maverick             
Posted Date: March 12, 2011     Points: 20   

Hello,

use this
ASP.net page
=========
Response.Write(Request.UserHostAddress())

Web Service
=========
Context.Request.ServerVariables ["REMOTE_ADDR"]
--

Thanks,
Maverick

Thanks,
Maverick
Author: Sunil Yadav       [Moderator]      
Posted Date: March 13, 2011     Points: 20   

@Maverick : The question was specific to Windows Application not in asp.net.

Author: Narayanan             
Posted Date: July 18, 2011     Points: 20   
Author: Ravi Ranjan Kumar             
Posted Date: July 30, 2011     Points: 20   

This article-[http://www.geekpedia.com/tutorial149_Get-the-IP-address-in-a-Windows-application.html ]
might help you.

Thanks & Regards
Ravi Ranjan Kumar
http://raviranjankr.wordpress.com


Post Reply

You must Sign In To post reply
 
 
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery
JavaScript/VBScriptBiztalkWPFPatten/PracticesWCFOthers
www.DotNetSpark.comUnAnsweredAll

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend