473,394 Members | 1,935 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,394 software developers and data experts.

Auto-detect internet connection

Hello,

How can I create an application/win-service in .NET that runs in the
background and detects automatically when the computer connects to the
internet?
I want to have a program that runs in the background (as service?) and when
the comuter connects to the internet, it will send the IP automatically to
an e-mail address.
Any idea?

Thanks,
Tom.
Mar 24 '07 #1
5 6191
Tom Rahav wrote:
How can I create an application/win-service in .NET that runs in the
background and detects automatically when the computer connects to the
internet?
I want to have a program that runs in the background (as service?) and when
the comuter connects to the internet, it will send the IP automatically to
an e-mail address.
Any idea?
What are you, a newbie script kiddie? :)

System.Net.NetworkInformation.NetworkChange class,
NetworkAvailabilityChanged event can monitor this.

System.Net.Mail has classes for sending mail, assuming you've got an
SMTP server you can send it to.

But don't hurt anyone with this information!

-- Barry

--
http://barrkel.blogspot.com/
Mar 24 '07 #2
It's OK friend, I'm not pretend to be the next internet spoiler... is just
that I suspect that one of my employees deals with business data, and
although I pay my best money to detective agencies, they are all helpless...
I want to prove them that it's much simplier than they think...
But thanks anyway!
;-)

"Barry Kelly" <ba***********@gmail.comwrote in message
news:5v********************************@4ax.com...
Tom Rahav wrote:
>How can I create an application/win-service in .NET that runs in the
background and detects automatically when the computer connects to the
internet?
I want to have a program that runs in the background (as service?) and
when
the comuter connects to the internet, it will send the IP automatically
to
an e-mail address.
Any idea?

What are you, a newbie script kiddie? :)

System.Net.NetworkInformation.NetworkChange class,
NetworkAvailabilityChanged event can monitor this.

System.Net.Mail has classes for sending mail, assuming you've got an
SMTP server you can send it to.

But don't hurt anyone with this information!

-- Barry

--
http://barrkel.blogspot.com/

Mar 24 '07 #3
Hi Tom,

You might find following KB useful:

#How to determine the connection state of your local system and how to
initiate or end an Internet connection by using Visual Basic .NET or Visual
Basic 2005
http://support.microsoft.com/kb/821770

You can periodically call InternetGetConnectedState() in your program to
determine current status.

For sending email part, you might also find following website useful:

http://www.systemnetmail.com
Hope this helps.

Sincerely,
Walter Wang (wa****@online.microsoft.com, remove 'online.')
Microsoft Online Community Support

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications. If you are using Outlook Express, please make sure you clear the
check box "Tools/Options/Read: Get 300 headers at a time" to see your reply
promptly.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.

Mar 26 '07 #4
Tom Rahav schreef:
Hello,

How can I create an application/win-service in .NET that runs in the
background and detects automatically when the computer connects to the
internet?
I want to have a program that runs in the background (as service?) and when
the comuter connects to the internet, it will send the IP automatically to
an e-mail address.
Any idea?

Thanks,
Tom.

So you want to create a backdoor program, imbed it into a picture (see
other thread) and then have that program report itself to an email
address giving you access to that backdoor program. And you expect us to
help you. If it's really one of your employees like you state in one of
the answers, then it should be a breeze to find his IP address on your
local network, just ask the sysop.
--
Rinze van Huizen
C-Services Holland b.v
Mar 26 '07 #5
Hi Tom,

Is your post solved? Please feel free to let me know if there's anything I
can help.

Regards,
Walter Wang (wa****@online.microsoft.com, remove 'online.')
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.

Mar 29 '07 #6

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

Similar topics

2
by: Manlio Perillo | last post by:
Hi. This post follows "does python have useless destructors". I'm not an expert, so I hope what I will write is meaningfull and clear. Actually in Python there is no possibility to write code...
1
by: Glabbeek | last post by:
I'm changing the layout of my site. Instead of using tables, I will use DIVs. It's working fine, except for 1 thing: In IE6 some DIVs are not the correct width. Mozilla and Opera are showing the...
5
by: Robert Downes | last post by:
I'm using the following in a page that I'm testing in Mozilla: p.actionLinkBlock {border: 1px #000000 dashed; padding: 0.2cm; width: auto} But the dashed border is extending to the right-edge...
20
by: Vijay Kumar R. Zanvar | last post by:
Hello, Unlike register, auto keyword can not be used to declare formal parameter(s). Is there any specific reason for this? Kind regards, Vijay Kumar R. Zanvar
6
by: Alpha | last post by:
I retrieve a table with only 2 columns. One is a auto-generated primary key column and the 2nd is a string. When I add a new row to the dataset to be updated back to the database. What should I...
5
by: Samuel | last post by:
Hi, I am running into a problem of mixing UICulture = auto and allowing users to select culture using a dropdown list. I am detecting a querystring, "setlang", and when found, setting the...
5
by: maya | last post by:
at work they decided to center divs thus: body {text-align:center} #content {width: 612px; text-align:left; margin: 0 auto 0 auto; } this works fine in IE & FF, EXCEPT in FF it doesn't work if...
22
by: nospam_news | last post by:
I currently get asked about my usage of "auto". What is it for? The keyword is clearly superflous here. In contrast to the huge majority of C/C++ developers I write definitions very explicitly...
2
by: Piotr K | last post by:
Hi, I've encountered a strange problem with Firefox which I don't have any idea how to resolve. To the point: I've <divelement with a style "height: auto" and I want to retrieve this value...
21
by: JOYCE | last post by:
Look the subject,that's my problem! I hope someone can help me, thanks
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.