Force One Request per Worker Process

S

stork

I have an awful old COM object that periodically blows up. What I'd
like to do is set up my app pool in IIS 6.0 so that only one
concurrent request per worker process. This way, when the COM object
blows up, it won't take down the rest of my requests with it, as is
presently the case. There's a ton of settings for IIS 6, and I am
being too lazy to dig through them all and experiment. What's the
right way to set this up?
 
J

John Saunders [MVP]

stork said:
I have an awful old COM object that periodically blows up. What I'd
like to do is set up my app pool in IIS 6.0 so that only one
concurrent request per worker process. This way, when the COM object
blows up, it won't take down the rest of my requests with it, as is
presently the case. There's a ton of settings for IIS 6, and I am
being too lazy to dig through them all and experiment. What's the
right way to set this up?

A try/catch block doesn't work for you?
 
S

stork

A try/catch block doesn't work for you?
--

No, it doesn't. The exception blows right past the try / catch and
terminates the asp_wp.exe process. I'm catching System.Exception.
I'm honestly surprised at this. I would have thought that try / catch
in C# would let me eat those. I even went looking for something that
let's C# catch structure exceptions ala the way C++ lets you eat GP
faults in a similar way, but to no avail. The only thing I could
think of would be if the exception being thrown wasn't a
System.Exception derived exception, which I've read can happen in
Biztalk, but in a mainstream C# application? I'm shocked.

I guess another approach to take would be to implement the web service
as a CGI. That would certainly force it to be an isolated process for
sure, but that basically leaves me doing the SOAP unwinding for the
web method.
 
J

John Saunders [MVP]

stork said:
No, it doesn't. The exception blows right past the try / catch and
terminates the asp_wp.exe process. I'm catching System.Exception.
I'm honestly surprised at this. I would have thought that try / catch
in C# would let me eat those. I even went looking for something that
let's C# catch structure exceptions ala the way C++ lets you eat GP
faults in a similar way, but to no avail. The only thing I could
think of would be if the exception being thrown wasn't a
System.Exception derived exception, which I've read can happen in
Biztalk, but in a mainstream C# application? I'm shocked.

Try the following:

try
{
// Call your COM object
}
catch
{
Debug.WriteLine("Unmanaged exception thrown");
}
 
S

stork

Try the following:

try
{
// Call your COM object}

catch
{
Debug.WriteLine("Unmanaged exception thrown");

}

Doesn't work at all. Blows right past the catch block. I'm
remarkably stunned.
 
J

John Saunders [MVP]

stork said:
Doesn't work at all. Blows right past the catch block. I'm
remarkably stunned.

Me too. Your COM object must _really_ be screwing things up. Perhaps it is
terminating without throwing an exception. Maybe it's calling the Win32 Exit
function (or whatever it's called).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,527
Members
44,998
Latest member
MarissaEub

Latest Threads

Top