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 7129475
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T11:14:48+00:00 2026-05-28T11:14:48+00:00

I have built an uploader for my application but struggling on something. Every 3

  • 0

I have built an uploader for my application but struggling on something.

Every 3 seconds my AJAX script makes a call to my ASP page, checkProgress.asp, to check how many files are in that folder during upload, it also checks if a txt file called complete.txt is in there.

When the count is done, it sends a response back to the AJAX script with something like “File 2 uploaded…” and 3 seconds later it will send “File 3 uploaded…”, and so on. If the complete.txt file was found, it would return “Complete” instead of counting. This worked fine, once, and then didn’t seem to perform properly after that. I get the “complete” message as I should but not getting the file count progress response.

I ran the checkProgress page manually with a new browser window to see why my progress panel was not updating with the progress, and noticed that the browser loading icon was just spinning, and when the upload finished, “Complete” popped up. So the AJAX call wasn’t reaching the page to gather the count of files because it was busy, which confuses me, because all that page is doing is counting how many files are in a folder.

Can somebody suggest what I’m doing wrong? Is this just simply not going to happen while that folder is being added to?

Here is my AJAX script. This starts when the upload starts:

var upload1ProgressCheckInt = setInterval(function() {
    var postData = "token="+token;
    $.ajaxSetup ({ cache: false });

    $.ajax({ type : 'GET', url : 'ajax/checkProgress.asp',
    dataType : 'html', data : postData,
    success : function(data) {
        if (data == "Failed") {
            $('#upload1ProgressStatus').html('Error: Upload cancelled!');
            clearInterval(upload1ProgressCheckInt);
            // do stuff
        } else if (data == "Complete") {
            $('#upload1ProgressStatus').html('Success: Files uploaded');
            clearInterval(upload1ProgressCheckInt);
            // do stuff
        } else {
            $('#upload1ProgressStatus').html(data);
        }
    }
    }); // end ajax
}, 3000);

and this the checkProgress.asp page:

Set FSO = Server.CreateObject("Scripting.FileSystemObject")
If (FSO.FileExists(Server.MapPath("../files/photos/"&token_&"/complete.txt"))) = True Then
    Response.Write "Complete"
Else
    Set folder = FSO.GetFolder(Server.MapPath("../files/photos/"&token_&"/"))
    Set files = folder.Files
    fileCounter = files.Count
    Response.Write "File "&fileCounter&" uploaded..."
End If
  • 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-28T11:14:48+00:00Added an answer on May 28, 2026 at 11:14 am

    …continuing from comments.

    So here is how I understand it. Classic ASP assigns a worker thread to each session, because Classic ASP object are single threaded, and thus the only way to share them (stored in the Session object) between requests is to have a single thread for each session. Naturally that means exactly what you are seeing – all other requests are blocked until upload finishes.

    Way to work around that would be to break out of the session. Unfortunately session cookie is HTTP-only (for security reasons), so I don’t think there is a way to drop it from AJAX request.

    You could make your IIS entry respond to another hostname and convert your AJAX request into JSONP request to that second hostname. I am not sure if there is a more graceful way to do it.

    ==================

    EDIT: Actually I take back the part about cookies. Surely you can kill them by giving headers:{Cookie:""} to your ajax() call? Worth a try….

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have built an ASP.NET MVC 3 web application (with exlusively Razor/cshtml pages) that
I have built a web page which contains a Crystal Report built using the
I have built an application in C# that I would like to be optimized
I have built a number of asp.net servercontrols into a class library, & I
I have built a MS Access 2007 application that can create reports files in
I have a Silverlight application I built with the create webpage activated. When I
Im trying to clone facebook image uploader which is built in java. But I
Thanks in advance. I have a php image uploader that I built, which is
I have built a small web application in PHP where users must first log
I have a site built on ASP.NET and C#. One of the requirements of

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.