Tech
Forums
Jobs
Books
Events
Videos
Conference
Annual Conference
Bcrypt
Ai Conference
Live
More
Interviews
Certification
Training
Career
Members
News
Blogs
Contribute
An Article
A Blog
A Video
An Ebook
An Interview Question
Register
Login
0
Answer
External IP Address Help...
Ask a question
Ask a question
Upload Source Code:
Select only zip and rar file.
Tony Spedaliere
18y
1.9k
1
Reply
I created this small application that would determine my IP Address and Hostname. However, the IP Address it returns is of my Local Machine. How can i get my application to return my External IP Address. Thanks!
<--Here's My Code-->
using
System.Windows.Forms;
using
System;
using
System.Net;
class
MYDns
{
public
static
void
Main()
{
string
hostName =
Dns
.GetHostName();
IPAddress
.DefaultIPGateway;
foreach
(
IPAddress
address
in
myself.AddressList)
{
MessageBox
.Show(
"IP Address: "
+ address.ToString(),
"Your IP Address"
);
MessageBox
.Show(
"Local HostName: "
+ hostName,
"Your HostName"
);
}
}
}
<--End Of Code-->
Post
Reset
Cancel
Answers (
0
)
Next Recommended Forum
How Can I check the System Idle Timer Value
How to set the TextBox to accept only decimal values ?