Process continues after stop

  • Thread starter Thread starter Chip
  • Start date Start date
C

Chip

Can somebody explain to me why my process continues to run after I halt
execution? This plays havoc with debugging. I expect to be starting a new
instance at the beginning of a loop and the first break point hit is
thousands of itterations into the process (from a previous instance). I get
a very random step behavior. Know I am watching a database continue to be
updated 10 minutes after I stopped the front-end process. I have to stop IIS
to halt execution.

Chip
 
How do you stop the process?

You should use Response.IsClientConnected to see if the browser stills
there, and in case of false, abort the thread.
 
I'm stopping the process within the VS 2003 dev environment.by pressing the
STOP button. Your advice sounds good, but should VS be stopping the process
when it's told to?
 
When you're not using VS and open the page in the IE, a loop keeps executing
even if you close IE, right? And as checking the Response.IsClientConnected
can avoid that, and I'm supposing that the same behavior is happening when
you debug thru VS.

Then maybe the solution is the same.

I think that the big question you should answer is: What I want to do in my
application when the user closes the browser during the loop? Should it stop
processing?

If so, the Response.IsClientConnected will solve both issues (debug and
runtime).
 
By the way, don't expect VS stops IIS process because the behavior is
different than a Windows Form application.

VS 2005 offers a different approach, allowing you to test the application
without having to use IIS.
 

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

Back
Top