473,670 Members | 2,615 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2495
> 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
7113
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 a user from information you got from the session. Each secure app on a site must challenge the user for name and password, each and every time the user accesses it (not just once and then store it in the session). If a secure app is multi-page,...
6
4578
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 died again.
4
3256
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 20045.jpg But for certain items, we don't have image. So, is it possible to check the image is available or no on the server. So, if the image is not available for certain item, then we want to display a default image for that item.
6
1608
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, before i can call for it. i already have a solution for this problem and it works quiet well, but i think, it is not that nice. my solution works that way, that i create a new thread, call a method of my com object and write back a value in my...
1
7754
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 response back from the server. Is this too much overhead, and how would you imlement this?
2
2800
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: Loop:---------------- Socket.Receive //receive http data chunks Socket.Send //'/r/n' data to check if connection is active ------------------------ The problem is that when connection is closed by the http server, the send socket function...
25
29741
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" name="ClickedElement" id="Messenger" /> </form> </body>
6
3676
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 should read the same XML file from a backup server. Does anyone have any idea how to achive that?? Any help is appreciated.
2
2328
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 server settings (server name and database name). But the connection check is made by calling for a scalar value in the database. What I'd rather do is graduate the error messages: 1. No server installed 2. Specified database name not installed...
0
8386
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8903
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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8592
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8661
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6216
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4213
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4393
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2802
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2044
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.