473,503 Members | 2,150 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Catching error message from ping

I've been using ADSI to lookup a complete hostname from active
directory from a partial as part of a script.

It goes something like:

Retrieve partial hostname from excel spreadsheet - authenticate this
to a full hostname from active directory - ping the host to
determine if it is reachable - if reachable perform a task.

The difficult is at the ping stage, some of the hostnames on active
directory do not seem to be able to resolve to I.P addresses. This
does not result in a ping succeeding or failing but merely an error,
how do I catch this error?

I am using My.Computer.Network.Ping to perform the ping operation.

Jul 4 '07 #1
2 1742
On Jul 4, 7:51 am, airwot4 <neale...@gmail.comwrote:
I've been using ADSI to lookup a complete hostname from active
directory from a partial as part of a script.

It goes something like:

Retrieve partial hostname from excel spreadsheet - authenticate this
to a full hostname from active directory - ping the host to
determine if it is reachable - if reachable perform a task.

The difficult is at the ping stage, some of the hostnames on active
directory do not seem to be able to resolve to I.P addresses. This
does not result in a ping succeeding or failing but merely an error,
how do I catch this error?

I am using My.Computer.Network.Ping to perform the ping operation.
Won't the standard try...catch block handle the exception?

Thanks,

Seth Rowe

Jul 4 '07 #2
Dump ping results into file and analyze file after ping completes.
"rowe_newsgroups" <ro********@yahoo.comwrote in message
news:11**********************@r34g2000hsd.googlegr oups.com...
On Jul 4, 7:51 am, airwot4 <neale...@gmail.comwrote:
>I've been using ADSI to lookup a complete hostname from active
directory from a partial as part of a script.

It goes something like:

Retrieve partial hostname from excel spreadsheet - authenticate this
to a full hostname from active directory - ping the host to
determine if it is reachable - if reachable perform a task.

The difficult is at the ping stage, some of the hostnames on active
directory do not seem to be able to resolve to I.P addresses. This
does not result in a ping succeeding or failing but merely an error,
how do I catch this error?

I am using My.Computer.Network.Ping to perform the ping operation.

Won't the standard try...catch block handle the exception?

Thanks,

Seth Rowe

Jul 4 '07 #3

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

Similar topics

1
1509
by: majid | last post by:
What means this error in event viewer? "aspnet_wp (PID: 1556) was recycled because it failed to ping message" .
11
7712
by: Tomas Kepic | last post by:
Hi, i'm trying to create my first ASP.NET project ( HelloASPWorld project) but an error occured when I put OK button in NewProject. ERROR: "The Web server reported the following error when...
6
5966
by: Harlin Seritt | last post by:
I am running the following code: import socket host = '9.9.45.103' port = 10001 conn = socket.socket(socket.AF_INET, socket.SOCK_STREAM) conn.connect((host, port))
1
1684
by: Rosi | last post by:
Hi, I am having web service with number of methods. We are using integrated windows authentication for this web service. This service is working fine with integrated windows authentication.
1
4743
by: Simon Porter | last post by:
Hi, I'm completely stuck with some example code I'm trying to use. The code is from http://msdn2.microsoft.com/en-us/library/system.net.networkinformation.ping.aspx I would have thought to...
18
18708
by: NEWSGROUPS | last post by:
I work for a large organization were my team has developed 2 very substantial databases in Access 2000. These databases have been working fine for the last 6 years with minimal issues or problems....
3
1542
by: patelxxx | last post by:
PERL Code to Ping a server: #!c:/Perl/bin/perl.exe use Net::Ping; use strict; use warnings; my $host = 192.168.0.1; # Real value removed by MODERATOR
0
3438
by: samuels | last post by:
HI Hello, I'm new to linux platform. I have installed oracle xe server in Fedora core 4. The installation is gone smoothly and it is working in that machine. I want to connect oracle...
3
3265
by: john | last post by:
I wrapped some fortran code using F2PY and need to be able to catch fortran runtime errors to run the following: # "grid" is a wrapped fortran module # no runtime errors incurred when run with...
0
7093
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
7287
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,...
1
7008
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
7467
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
5594
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,...
1
5022
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...
0
3168
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1521
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 ...
0
399
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...

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.