Click here to Skip to main content
15,885,032 members
Home / Discussions / C#
   

C#

 
AnswerRe: how to load values into combobox Pin
Pete O'Hanlon26-Nov-12 22:53
mvePete O'Hanlon26-Nov-12 22:53 
Questionideal time out problem Pin
VishwaKL26-Nov-12 21:21
VishwaKL26-Nov-12 21:21 
AnswerRe: ideal time out problem Pin
OriginalGriff26-Nov-12 21:43
mveOriginalGriff26-Nov-12 21:43 
GeneralRe: ideal time out problem Pin
VishwaKL26-Nov-12 23:44
VishwaKL26-Nov-12 23:44 
AnswerRe: ideal time out problem Pin
Simon_Whale26-Nov-12 23:48
Simon_Whale26-Nov-12 23:48 
AnswerRe: ideal time out problem Pin
BobJanova28-Nov-12 23:53
BobJanova28-Nov-12 23:53 
GeneralRe: ideal time out problem Pin
VishwaKL29-Nov-12 20:51
VishwaKL29-Nov-12 20:51 
QuestionDetecting Internet Connection Loss Pin
Roger Wright26-Nov-12 16:29
professionalRoger Wright26-Nov-12 16:29 
My fancy new WD MyNet 900 Wireless Router periodically requires a reboot to establish an Internet connection with the rest of my devices. I know that Windows can detect when the network connection is lost, but I'd like to do so myself in C#, and trigger a reboot of the router via a hardwired network connection to an IP-enabled ac outlet that provides power to the router. Yeah, it's a kluge, but I like the router otherwise. It just likes to go to sleep sometimes.

I'm currently preparing an Iris-based home automation system, and the last thing I need is for it to be unable to call me when it needs to, just because this silly router has lost its way. Trouble is, I have no idea what to search for in the .Net documentation. Can anyone suggest a class that can monitor and fire an event when the network connection is lost on a wireless interface?

My thinking is, I can run a service on my main computer that monitors the wireless network connection. When it detects that the connection has failed, it cycles the power outlet for the router using a hardwired Ethernet network and waits for a minute to see if the wireless network is re-established. If not, it can try again as often as needed to fix the problem; I'd set some maximum number of retries before assuming that the ISP is sucking again and giving up. If I was willing to pay for it, I do have a couple of cellular modems I could then use to have it call the ISP over and over again until someone fixes the service, but that would cost a bit more than I'm willing to pay to Sprint. Still, it could be fun. But I digress...

Where should I be finding a function to detect a lost wireless connection? MSDN hasn't been much help tonight, but Google found a useful GetIsNetworkAvailable function in the System.Net.NetworkInformation namespace. Unfortunately, this call will return true even if the upstream Internet connection has been lost. The article stops just short of providing any useful information for handling that situation.
Will Rogers never met me.

AnswerRe: Detecting Internet Connection Loss Pin
Abhinav S26-Nov-12 16:56
Abhinav S26-Nov-12 16:56 
GeneralRe: Detecting Internet Connection Loss Pin
Roger Wright26-Nov-12 17:40
professionalRoger Wright26-Nov-12 17:40 
AnswerRe: Detecting Internet Connection Loss Pin
Peter_in_278026-Nov-12 18:38
professionalPeter_in_278026-Nov-12 18:38 
GeneralRe: Detecting Internet Connection Loss Pin
Roger Wright27-Nov-12 2:32
professionalRoger Wright27-Nov-12 2:32 
QuestionDateTime NullReferenceException Pin
zeqir8525-Nov-12 22:36
zeqir8525-Nov-12 22:36 
AnswerRe: DateTime NullReferenceException Pin
Ingo25-Nov-12 23:15
Ingo25-Nov-12 23:15 
GeneralRe: DateTime NullReferenceException Pin
zeqir8525-Nov-12 23:37
zeqir8525-Nov-12 23:37 
GeneralRe: DateTime NullReferenceException Pin
Ennis Ray Lynch, Jr.26-Nov-12 6:39
Ennis Ray Lynch, Jr.26-Nov-12 6:39 
AnswerRe: DateTime NullReferenceException Pin
Ingo26-Nov-12 23:17
Ingo26-Nov-12 23:17 
AnswerRe: DateTime NullReferenceException Pin
Abhinav S26-Nov-12 16:58
Abhinav S26-Nov-12 16:58 
QuestionProcess.Start with current folder? Pin
Joni_7825-Nov-12 21:52
Joni_7825-Nov-12 21:52 
AnswerRe: Process.Start with current folder? Pin
Richard MacCutchan25-Nov-12 22:06
mveRichard MacCutchan25-Nov-12 22:06 
GeneralRe: Process.Start with current folder? Pin
Joni_7825-Nov-12 22:17
Joni_7825-Nov-12 22:17 
GeneralRe: Process.Start with current folder? Pin
Richard MacCutchan25-Nov-12 22:36
mveRichard MacCutchan25-Nov-12 22:36 
GeneralRe: Process.Start with current folder? Pin
Joni_7826-Nov-12 0:30
Joni_7826-Nov-12 0:30 
GeneralRe: Process.Start with current folder? Pin
Richard MacCutchan26-Nov-12 0:48
mveRichard MacCutchan26-Nov-12 0:48 
GeneralRe: Process.Start with current folder? Pin
Joni_7827-Nov-12 23:44
Joni_7827-Nov-12 23:44 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.