473,397 Members | 2,099 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,397 software developers and data experts.

check server is available?

one of my apps is having problems.

I've got my own error handling routine, which logs errors, to a table in the
back end, which is on the server.

But.... a very common error at the moment, is, yes you've guessed it, 'disk
or network error...'

So I only know about those errors if the users tell me. I suspect the whole
network is a bit flaky, though these errors occur most often on 2 machines.

So I'm going to change my error logging routine to store errors on the local
machines. Partly to show to the network engineer!

But it does mean that I'll want to copy the records up to a central table on
the server every so often - I don't want to have to visit every machine to
look at the error logs.

Not sure when to do the copy, on some sort of timer, on close, on open or
whatever? Any ideas on a sensible trigger for that? This isn't a 24/7
operation.

Also, as the network is dodgy, what's the easiest way to check the server is
available before I actually attempt the copy? Shell out to a command line
and ping?

Yours, Mike MacSween
Nov 13 '05 #1
1 2484
> Also, as the network is dodgy, what's the easiest way to check the server is
available before I actually attempt the copy? Shell out to a command line
and ping?


There's a function at vbnet.net that encapsulates the pinging in a
function. I used it once to pass an IP address and then it would
return the result of the ping as a text result. So just compare the
returned result to whatever the "success" message is. If that and
your answer are the same, you're in business, otherwise, something's
wrong.
Nov 13 '05 #2

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

Similar topics

27
by: mrbog | last post by:
Tell me if my assertion is wrong here: The only way to prevent session hijacking is to NEVER store authentication information (such as name/password) in the session. Well, to never authenticate...
6
by: mark4asp | last post by:
Hello, Is there a simple way to check whether a database driver is available on a remote server? I only have ftp access so I can only run ASP scripts. An ASP application on a host has...
4
by: Anil | last post by:
Hi All, We have hundreds of images on our server. Depending on the ItemID (fetched from database) we display the image to the client. For ex. if the ItemID is 20045 then, we display the image...
6
by: Hermann Maier | last post by:
Hi, i am using the com api of a program and if this program is shut down and my program calls a method of the api, it crashs. that means, i need to check, if the com server is still available,...
1
by: aaa | last post by:
What is the most efficient way to do a check to see if a webservice exists before attempting to execute. I was thinking of just creating an HTTP object then initiating a request to see if i get a...
2
by: Nuno Magalhaes | last post by:
How to check for a closed http socket without losing any data? (MSDN says to send something to server). Somewhere in my code (after sending the http header in plain text) I'm doing a loop with:...
25
by: pamelafluente | last post by:
Hi Guys, I have the following HTML code which is doing a GET to a page, say MyUrl.aspx : <body> <form name="form1" method="get" action="MyUrl.aspx" id="form1"> <input type="hidden"...
6
by: test2000 | last post by:
Hello I'm trying to write a javascript that checks if a server/host is available. To be more precice. I would like to check if the browser can read an XML file from a server. If not the script...
2
by: Earl | last post by:
Is there any sort of check that can be done to see if a particular instance of SQL Server is present? I already call a method to check for connection -- if no connection, I have the user re-enter...
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
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
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,...
0
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...
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
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...
0
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
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...

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.