Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6994109
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T19:51:01+00:00 2026-05-27T19:51:01+00:00

What happens if a long running page is closed by the user before he

  • 0

What happens if a long running page is closed by the user before he has received a response?

Does the page continue to run in the it’s thread or is the thread terminated as soon as the user closes the page?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T19:51:02+00:00Added an answer on May 27, 2026 at 7:51 pm

    Oded is correct, the request keeps processing long after the user has browsed away or closed their browser window. For fun try this:

    protected void Page_Load(object sender, EventArgs e)
    {
        for (int count = 0; count < 100; count++)
        {
            Debug.WriteLine("Processing {0}, IsClientConnected={1}", count, Response.IsClientConnected);
            Response.Write(string.Format("Processing {0}<br/>", count));
            Response.Flush();
            Thread.Sleep(1000);
        }
        Response.Write("<h1>Done<h1/>");
    }
    

    The request keeps processing after navigating away, but the IsClientConnected property changes to false. You can use this to your advantage, but you have to write code to take advantage of that, normally for long running requests.

    Processing 0, IsClientConnected=True
    Processing 1, IsClientConnected=True
    Processing 2, IsClientConnected=True
    Processing 3, IsClientConnected=True
    Processing 4, IsClientConnected=True
    Processing 5, IsClientConnected=True
    Processing 6, IsClientConnected=True
    Processing 7, IsClientConnected=True
    Processing 8, IsClientConnected=True
    Processing 9, IsClientConnected=True
    Processing 10, IsClientConnected=True
    Processing 11, IsClientConnected=True
    Processing 12, IsClientConnected=True
    Processing 13, IsClientConnected=False
    Processing 14, IsClientConnected=False
    Processing 15, IsClientConnected=False
    Processing 16, IsClientConnected=False
    Processing 17, IsClientConnected=False
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

What happes when the script that made @mysql_connect($server, $user, $password) dies? How long does
What happens? I'm guessing that somehow the post or page is parsed before displaying,
I have an ASP.Net application running under IIS 6. A simple page has two
I have a long-running process that must run every five minutes, but more than
What happens if you kill a long-running alter query? Will the alter query simply
Say I have script, that does long polling on server to check if user
what would happen if I spin off a thread to execute a long-running process
I have a possibly long running program that currently has 4 processes, but could
I have a a wait form FormWait (long running task notification), that has ShowMessage(string
This happens after I hit Build and Go to run my app on my

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.