473,382 Members | 1,367 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Local IP Address?

Hi all,

What's the best way to retreive the local IP addresses in a .NET winforms
app?

Thanks!
Mar 20 '07 #1
3 4520
On Mar 20, 3:50 pm, Spam Catcher <spamhoney...@rogers.comwrote:
Hi all,

What's the best way to retreive the local IP addresses in a .NET winforms
app?

Thanks!
http://groups.google.com/group/micro...62dde20104a090

Mar 20 '07 #2
za***@construction-imaging.com wrote in
news:11**********************@l75g2000hse.googlegr oups.com:
On Mar 20, 3:50 pm, Spam Catcher <spamhoney...@rogers.comwrote:
>Hi all,

What's the best way to retreive the local IP addresses in a .NET
winforms app?

Thanks!

http://groups.google.com/group/micro...nguages.vb/bro
wse_thread/thread/e31f9af4be6bc6a1/5462dde20104a090?lnk=gst&q=ip+addres
s&rnum=1&hl=en#5462dde20104a090
Wow that was a fast response! I knew I had to do a lookup of sorts on the
local machine name, but I'm not too familiar with the System.Net.DNS
classes.

Thank you, worked great.
Mar 20 '07 #3
SPAM Catcher,

I posted the code for this one week ago in the same forum:

Imports System.Net

Dim ipAddress As IPHostEntry = Dns.GetHostByName(Dns.GetHostName)
Me.Text = ipAddress.AddressList.GetValue(0).ToString

I hope this helps,

--
Newbie Coder
(It's just a name)
Mar 23 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Stefan Mueller | last post by:
I've just installed phpMyAdmin. If I have the line $cfg = 'http://localhost/php/phpmyadmin'; in my config.inc.php I can login to phpMyAdmin without any problems from my local machine. But it's...
2
by: war_wheelan | last post by:
I have two servers running SQL Server on the same network and I am receiving errors registering the various instances as follows: SERVER1 tried to register the local instance (by netname, ip...
3
by: Frank Jiao | last post by:
I can get my local IPv6 address in Win2003 use the source code as below: string localName = Dns.GetHostName(); string address = ""; string scopeId = ""; IPHostEntry hostEntry = Dns.Resolve(...
23
by: Timothy Madden | last post by:
Hello all. I program C++ since a lot of time now and I still don't know this simple thing: what's the problem with local functions so they are not part of C++ ? There surely are many people...
6
by: Brad | last post by:
I have a win2003 server workstation with multiple webs, each web has it's own ip address. In VS2005, if I select to open an existing web site, select Local IIS, the dialog correctly displays a...
4
by: Tom | last post by:
I come from C but don't really understand why in C++ you can return a temporary object from a function. For example: class Test { public: Test() { cout << "Address of object: " <<this...
5
by: Hooyoo | last post by:
Hi, here, How to get local machine name and IP address? Thanks.
1
by: jcprince | last post by:
Hi Not sure I can do what I'm trying to do without using a 3rd party component like Dart. I need to build a windows service to create a socket connection on an IBM mainframe using an IP and port...
1
by: =?Utf-8?B?QWdlbmR1bQ==?= | last post by:
I have an issue where I have a remote IP Address, and I need to discover the local network interface IP Address which is viewable to the remote IP Address (for UPnP document purposes). For...
7
by: RN1 | last post by:
Is it possible to connect to my local SQL Server 2005 database from a remote web server? If yes, what ConnectionString do I use? Thanks, Ron
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.