473,386 Members | 1,734 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,386 software developers and data experts.

Using PerlScript In ASP

I use PerlScript in ASP, where got a Error, IIS will send the Error
messenge to client. how to resume asp running? my asp need to handle
the errors.

For Example:
$r_socket = IO::Socket::INET->new(
PeerAddr => $host,
PeerPort => $port,
Proto => 'tcp',
Timeout => 4);

where $host was closed, IIS will return "HTTP 500 - Internal server
error".
Error in IIS log is "|2|80004005|IO::Socket::INET:_connect:_Unknown_er ror".

there is "on err resume next" in vbscript. and perlscript?
Jul 19 '05 #1
2 3058
ka**@sina.com (KaXo) wrote in message news:<80**************************@posting.google. com>...
I use PerlScript in ASP, where got a Error, IIS will send the Error
messenge to client. how to resume asp running? my asp need to handle
the errors.

For Example:
$r_socket = IO::Socket::INET->new(
PeerAddr => $host,
PeerPort => $port,
Proto => 'tcp',
Timeout => 4);

where $host was closed, IIS will return "HTTP 500 - Internal server
error".
Error in IIS log is "|2|80004005|IO::Socket::INET:_connect:_Unknown_er ror".

there is "on err resume next" in vbscript. and perlscript?


either eval or do checking on $r_socket the next line:

eval {
$r_socket = IO::Socket::INET->new(
# etc
);
};

if the error is on the IO::Socket::INET->new line, or:

$r_socket = IO::Socket::INET->new(
# etc
);
if (! defined $r_socket) {
$Response->Write("<b>Client disconnected</b>");
} else {
# do something with $r_socket
}
Jul 19 '05 #2
pa******@hotmail.com (Will Stranathan) wrote in message news:<6a*************************@posting.google.c om>...
ka**@sina.com (KaXo) wrote in message news:<80**************************@posting.google. com>...
I use PerlScript in ASP, where got a Error, IIS will send the Error
messenge to client. how to resume asp running? my asp need to handle
the errors.

For Example:
$r_socket = IO::Socket::INET->new(
PeerAddr => $host,
PeerPort => $port,
Proto => 'tcp',
Timeout => 4);

where $host was closed, IIS will return "HTTP 500 - Internal server
error".
Error in IIS log is "|2|80004005|IO::Socket::INET:_connect:_Unknown_er ror".

there is "on err resume next" in vbscript. and perlscript?


either eval or do checking on $r_socket the next line:

eval {
$r_socket = IO::Socket::INET->new(
# etc
);
};

if the error is on the IO::Socket::INET->new line, or:

$r_socket = IO::Socket::INET->new(
# etc
);
if (! defined $r_socket) {
$Response->Write("<b>Client disconnected</b>");
} else {
# do something with $r_socket
}


thank you very much. it works fine now.
Jul 19 '05 #3

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

Similar topics

1
by: Joe | last post by:
I am trying to write a Perlscript to be used with some HTML pages. Here is how it works: 1.. The first HTML page has a form which requests for user input. Then it passes the QUERY_STRING...
2
by: rawCoder | last post by:
Hi All, I have a *.cer file, a public key of some one and I want to encrypt some thing using this public key. Can someone point me to a sample code for Encrypting some file using...
1
by: Mike | last post by:
When trying to compile (using Visual Web Developer 2005 Express Beta; frameworkv2.0.50215 ) the source code below I get errors (listed below due to the use of ICallBackEventHandler. Ultimately I...
10
by: Christopher Benson-Manica | last post by:
Why can't I use a class destructor in a using declaration: using MyClass::~MyClass; ? -- Christopher Benson-Manica | I *should* know what I'm talking about - if I ataru(at)cyberspace.org ...
17
by: beliavsky | last post by:
Many of my C++ programs have the line using namespace std; but the "Accelerated C++" book of Koenig and Moo has many examples where the library names are included one at a time, for example ...
8
by: Petter Reinholdtsen | last post by:
I ran into a problem on HP-UX 11.00 the other day, where it refused to compile a program using 'using namespace std;' at the top. The reason seem to be that the compiler refuses to accept 'using...
14
by: john.burton.email | last post by:
I've done some extensive searching and can't seem to find an answer to this - Is it correct to using "using" with templates, for example: using std::vector; Or do I need to specify the type...
4
by: banz | last post by:
Hello I have a problem to resolve: I wrote a Perlscript which caches data from a server (local on my machine) I would like to have a other connection to a remote server but I don't know how to...
3
by: JDeats | last post by:
I have some .NET 1.1 code that utilizes this technique for encrypting and decrypting a file. http://support.microsoft.com/kb/307010 In .NET 2.0 this approach is not fully supported (a .NET 2.0...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
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...

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.