Auto-detect internet connection

  • Thread starter Thread starter Tom Rahav
  • Start date Start date
T

Tom Rahav

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.
 
Tom said:
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
 
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!
;-)
 
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 ([email protected], remove 'online.')
Microsoft Online Community Support

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.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/subscriptions/support/default.aspx.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.
 
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.
 
Hi Tom,

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

Regards,
Walter Wang ([email protected], 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.
 
Back
Top