469,578 Members | 1,298 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,578 developers. It's quick & easy.

ASP KeyboardInterrupt errors

[repost due to non-appearance of mailed posting]

I'm mailing the list in the hope that somebody has come up with a solution
to the occasional spurious "Keyboard Interrupt" exception that gets raised
in the ASP environment. It's a little awkward to explain to my client why
his COM server is failing this way, and the logic of the application makes
it difficult to trap the exception and repeat what's already been done.

I can't find anything with Google that makes it look like this problem is
still being addressed.

regards
--
Steve Holden http://www.holdenweb.com/
Python Web Programming http://pydish.holdenweb.com/pwp/
Jul 18 '05 #1
2 2391
Steve Holden wrote:
[repost due to non-appearance of mailed posting]

I'm mailing the list in the hope that somebody has come up with a solution
to the occasional spurious "Keyboard Interrupt" exception that gets raised
in the ASP environment. It's a little awkward to explain to my client why
his COM server is failing this way, and the logic of the application makes
it difficult to trap the exception and repeat what's already been done.

I can't find anything with Google that makes it look like this problem is
still being addressed.

I have saved a hack for this:
From:
"Chris Prinos" <cp*****@foliage.com>
Date:
Thu, 30 May 2002 00:21:56 GMT
Newsgroups:
comp.lang.python

I had the same issue with my IIS system, and had to use a workaround that
disables the KeyboardInterrupt from being processed. The code I use is
shown below.

see http://mail.python.org/pipermail/pyt...il/039881.html and
http://mail.python.org/pipermail/pyt...il/099002.html for an
explanation
Chris
----------------------------------------------------------------------------
----------------
<!--
These first two script blocks are needed because IIS looks for a SCRIPT
block in the default scripting language of the server. That could be
JScript or VBScript, but it won't be Python.

This is only a problem for this global.asa file.
-->
<SCRIPT LANGUAGE=Jscript RUNAT=Server>
function dummy() {}
</SCRIPT>
<SCRIPT LANGUAGE=VBScript RUNAT=Server>
Sub dummy2
ignore = "me"
End Sub
</SCRIPT>

<SCRIPT LANGUAGE=Python RUNAT=Server>
def Application_OnStart():
# this signal code is a workaround for a bug that causes
# Ctl-C keyboard interrupts to be sent to the python activex engine.
# Not sure if this is a problem with ASP, or python, but if the
# handler is not provided, KeyboardInterrupts will pop up in the most
# inoportune places.
import signal
def noOp(a,b): pass
signal.signal(signal.SIGINT, noOp)
</SCRIPT>

Jul 18 '05 #2
Max M wrote:
I have saved a hack for this: ....
From:
"Chris Prinos" <cp*****@foliage.com>
Date:
Thu, 30 May 2002 00:21:56 GMT
Newsgroups:
comp.lang.python

I had the same issue with my IIS system, and had to use a workaround that
disables the KeyboardInterrupt from being processed. The code I use is
shown below.

see http://mail.python.org/pipermail/pyt...il/039881.html and
http://mail.python.org/pipermail/pyt...il/099002.html for an
explanation


Note that recent win32alls also have this hack in place.

Mark.

Jul 18 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

8 posts views Thread by Ivan Nestlerode | last post: by
reply views Thread by PantherSE | last post: by
4 posts views Thread by Tamas Nepusz | last post: by
1 post views Thread by darren kirby | last post: by
4 posts views Thread by Tony Nelson | last post: by
6 posts views Thread by ruka_at_ | last post: by
2 posts views Thread by Michael Goerz | last post: by
1 post views Thread by radim.marek | last post: by
7 posts views Thread by Brendon Costa | last post: by
reply views Thread by suresh191 | last post: by
4 posts views Thread by guiromero | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.