Need process to detect if network is available

B

BJ

Problem: How can I code up a client side process to detect if the
network is available?


Synopsis: I am writing ASP.NET input forms for a Panasonic Tuff book.
The users will be walking around the plant with a wireless connection.
There are some pockets of non-connectivity. I've been tasked with
disabling the submit button on the form if the network is unavailable.

Possible solution: I can instantiate a timed process (VB.NET 2.0
console application) that will utilize the GetIsNetworkAvailable method
when the form opens. If the network is not available, I can update a
flat file on the client. The ASP.NET program would utilize Javascript
behind the submit button that would interrogate the flat file and
cancel the Submit process if no network is available.

My problem with this solution is timing. From the time the network is
checked to the time the file is checked.

Is there a way, on the client, that I can check the availability of the
network?
 
?

=?ISO-8859-1?Q?G=F6ran_Andersson?=

You could build an ActiveX control that would run in the browser.
 
B

BJ

John,

I looked over the code, but this would either implement on the server
or implement as a console application which would perform some flagging
to the client application that the network is not available. Framework
2.0 has a process method (NetworkInterface.GetIsNetworkAvailable) that
will return a boolean value if the nextwork is not available.

What I really need is a heartbeat process to tell if the network is
available fron the client side.

Maybe a client side call (javascript or VB script) to a local
application to test network availability. Is that what you were
thinking with ths Network Sniffer?
 
J

Juan T. Llibre

re:
What I really need is a heartbeat process to tell if the network is
available fron the client side.

You'll need to write an Activex object to do that.
 
J

John Timney \(MVP\)

I was thinking that as long as you can detect outgoing packets your network
is active, but Juan is correct that you would need an activeX object to
interrogate the results. Thinking on it however, I probably gave you the
wrong suggestion - why not think about implementing an Ajax ping method in
your pages - it should be fairly instant to test if you have connectivity to
your server.

http://www.clearnova.com/ajax/

Regards

John Timney (MVP)
 
B

BJ

John,

Thank you for the AJAX example. It looks like I could use a similar
version of this process to "testing" network availability.

Juan,

Sorry, I haven't used ActiveX controls in Web applicaitons development
before. If I'm understanding it correctly, I would use an activeX
control on the web page that would sniff out a network connection (?)
and return back (??) wether or not to continue processing? Would that
use XMLHTTP?

Any examples you can provide would be great.

BJ
 
J

Juan T. Llibre

re:
If I'm understanding it correctly, I would use an activeX control
on the web page that would sniff out a network connection (?)
and return back (??) wether or not to continue processing?

Hmmm... no.

You would install the activeX control on the client ( after the client agrees to that );
the control would check whether there's network availability, and it could return
that info to your server.

There's a steep learning curve...

http://msdn.microsoft.com/library/default.asp?url=/workshop/components/activex/intro.asp





John,

Thank you for the AJAX example. It looks like I could use a similar
version of this process to "testing" network availability.

Juan,

Sorry, I haven't used ActiveX controls in Web applicaitons development
before. If I'm understanding it correctly, I would use an activeX
control on the web page that would sniff out a network connection (?)
and return back (??) wether or not to continue processing? Would that
use XMLHTTP?

Any examples you can provide would be great.

BJ
 
B

BJ

Ok I feel stupid ... been doing .net and the brain can't work properly
(Haven't done an ActiveX in over 4 years. Not to steep, I might slip
and loss whats left of the brain cell cache =)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,598
Members
45,158
Latest member
Vinay_Kumar Nevatia
Top