473,587 Members | 2,448 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 6205
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.Netw orkInformation. NetworkChange class,
NetworkAvailabi lityChanged 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.c om...
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.Netw orkInformation. NetworkChange class,
NetworkAvailabi lityChanged 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 InternetGetConn ectedState() 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
2597
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 that follows C++ RAII pattern. Of course Python objects are not statics like in C++, but in C++ the auto_ptr class is used for enforcing this...
1
13951
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 page the way I want. Does anybody know a solution for this? First of all, the code I am using: CSS ------- body {
5
6093
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 of the screen. I want it to only extend as far as it needs to to nicely contain the content within (a couple of links). Is width: auto the wrong...
20
2847
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
5057
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 do with the 1st column ? (Below I have a "1" in place for now). Also, Does the datase.AcceptChanges(); updates the changes to the database? Which...
5
5036
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 CurrentUICulture to what's specified in the querystring. Since I want to allow UICulture auto detecting, I add UICulture = "auto" to page directive on...
5
3254
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 I change 'auto' to 0 for left and right margin values; I have to leave those at 'auto'.. so I would like to know what exactly means 'auto' -- what...
22
3050
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 like that: int main(char argc, char *argv, char *env) { try { auto Exception mainException(1); mainException.setErrNo(42);
2
3062
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 ("auto") in JavaScript - however instead of getting "auto" value, I get calculated height. In IE and Opera it simply returns "auto". Any ideas how to...
21
6322
by: JOYCE | last post by:
Look the subject,that's my problem! I hope someone can help me, thanks
0
7920
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7849
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8215
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8347
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
8220
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5718
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5394
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3844
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
1189
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.