473,569 Members | 2,737 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.Net work.Ping to perform the ping operation.

Jul 4 '07 #1
2 1748
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.Net work.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_newsgroup s" <ro********@yah oo.comwrote in message
news:11******** **************@ r34g2000hsd.goo glegroups.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.Net work.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
1521
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
7719
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 attempting to create or open the Web project located at the following URL: 'https://localhost/HelloASPWorld'.'HTTP/1.0 503 Service Unavailable'."
6
5970
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
1687
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
4760
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 create a new 'PingExample' object the correct syntax would be, PingExample ping = new PingExample("simon.heber.ltd");
18
18728
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. About 1 week ago today we have started experiencing the error "Microsoft Visual Basic Run Time Error 3043 Disk or Network Error" just about every...
3
1548
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
3442
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 client(9i) which is running in the windows xp. I have added a oracle service using the net manager to the database(XE) running in the linux server. But...
3
3275
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 the correct inputs for filetype #------------------------------- def readGrid( self, coord='xyz' ): mg = ( '.FALSE.', '.TRUE.' ) form = (...
0
7700
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7924
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. ...
0
8125
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
6284
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
3653
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...
0
3642
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2114
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
1
1221
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
938
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.