knowing when a file download is complete

Ask a Question related to ASP, Design and Development.

  1. #1

    Default knowing when a file download is complete

    I have a requirement to record in a database when a file is finished
    downloading to the end-user. Currently when a user clicks a download icon
    for a file it directs to an ASP page that records the "hit" into a database,
    then I use a response.redirect "filename.exe" to point the user to the
    download. What I'm missing is knowing when the download is complete so I
    can update the database to show the file successfully completed its
    download. Is there a way to do this with ASP? A way to do this with an
    aftermarket component?


    IGC Guest

  2. Similar Questions and Discussions

    1. Unable to connect to server to complete download
      I have tried unsucccefully for some weeks to update AdobeReader 7.0.8. on a Mac OSX 10.4.8. I regulalry get messages saying Adobe has completed...
    2. Read file knowing PRECISE end of each line
      Hallo I'd like to parse a file but knowing where EXACTLY the end of each line is (that is: at which byte, included), so to browse it line by...
    3. Error: Could not complete this operation. The file could not be found.
      When attempting to open .psd, .jpg, .gif, and other image files in Adobe ImageReady CS, I'm frequently, sporadically, and without rhyme or reason,...
    4. getting complete file listings in perl
      c@msn.com wrote: <snip> Could you expand on that? -- Gunnar Hjalmarsson Email: http://www.gunnar.cc/cgi-bin/contact.pl
    5. WebRequest - download files from directory without knowing name of file
      I have access to an internet directory and files will be placed in this directory periodically. I am writing a service to poll that directory and...
  3. #2

    Default Re: knowing when a file download is complete

    > I have a requirement to record in a database when a file is finished
    > downloading to the end-user.
    Sorry, ASP can't detect this. You could try response.isClientConnected but
    that only refers to the web page... e.g. if they close the browser window
    and continue the download, you will get a false negative.

    A


    Aaron Bertrand - MVP Guest

  4. #3

    Default Re: knowing when a file download is complete

    Other than ASP, what can? There must be something out there that does.
    When I download patches from MS and I get disconnected mid-stream, it knows
    that I did and will continue downloading. Then it does an install after the
    download completes. Then the page redirects to a install complete page.
    Although I don't need to do an actual install, I do NEED to know when the
    download successfully completes.



    "Aaron Bertrand - MVP" <aaron@TRASHaspfaq.com> wrote in message
    news:eCUZq%23NmDHA.1948@TK2MSFTNGP12.phx.gbl...
    > > I have a requirement to record in a database when a file is finished
    > > downloading to the end-user.
    >
    > Sorry, ASP can't detect this. You could try response.isClientConnected
    but
    > that only refers to the web page... e.g. if they close the browser window
    > and continue the download, you will get a false negative.
    >
    > A
    >
    >

    IGC Guest

  5. #4

    Default Re: knowing when a file download is complete

    That's because Windows Update uses an activeX control that is installed on
    your computer the first time you go to the site, assuming you accept the
    installation.

    Ray at work

    "IGC" <nospam@infograph.com> wrote in message
    news:%23wDjQQOmDHA.3320@tk2msftngp13.phx.gbl...
    > Other than ASP, what can? There must be something out there that does.
    > When I download patches from MS and I get disconnected mid-stream, it
    knows
    > that I did and will continue downloading. Then it does an install after
    the
    > download completes. Then the page redirects to a install complete page.
    > Although I don't need to do an actual install, I do NEED to know when the
    > download successfully completes.
    >
    >
    >
    > "Aaron Bertrand - MVP" <aaron@TRASHaspfaq.com> wrote in message
    > news:eCUZq%23NmDHA.1948@TK2MSFTNGP12.phx.gbl...
    > > > I have a requirement to record in a database when a file is finished
    > > > downloading to the end-user.
    > >
    > > Sorry, ASP can't detect this. You could try response.isClientConnected
    > but
    > > that only refers to the web page... e.g. if they close the browser
    window
    > > and continue the download, you will get a false negative.
    > >
    > > A
    > >
    > >
    >
    >

    Ray at Guest

  6. #5

    Default Re: knowing when a file download is complete

    What is that ActiveX componenet called? Where do I get that ActiveX
    component?


    "Ray at <%=sLocation%>" <myfirstname at lane34 dot com> wrote in message
    news:u2YeUTOmDHA.3256@tk2msftngp13.phx.gbl...
    > That's because Windows Update uses an activeX control that is installed on
    > your computer the first time you go to the site, assuming you accept the
    > installation.
    >
    > Ray at work
    >
    > "IGC" <nospam@infograph.com> wrote in message
    > news:%23wDjQQOmDHA.3320@tk2msftngp13.phx.gbl...
    > > Other than ASP, what can? There must be something out there that does.
    > > When I download patches from MS and I get disconnected mid-stream, it
    > knows
    > > that I did and will continue downloading. Then it does an install after
    > the
    > > download completes. Then the page redirects to a install complete page.
    > > Although I don't need to do an actual install, I do NEED to know when
    the
    > > download successfully completes.
    > >
    > >
    > >
    > > "Aaron Bertrand - MVP" <aaron@TRASHaspfaq.com> wrote in message
    > > news:eCUZq%23NmDHA.1948@TK2MSFTNGP12.phx.gbl...
    > > > > I have a requirement to record in a database when a file is finished
    > > > > downloading to the end-user.
    > > >
    > > > Sorry, ASP can't detect this. You could try
    response.isClientConnected
    > > but
    > > > that only refers to the web page... e.g. if they close the browser
    > window
    > > > and continue the download, you will get a false negative.
    > > >
    > > > A
    > > >
    > > >
    > >
    > >
    >
    >

    IGC Guest

  7. #6

    Default Re: knowing when a file download is complete

    It's called Windows Update, and Microsoft made it for the Windows Update
    site. It's not something you can download and use for your own site or
    anything like that.

    Ray at work

    "IGC" <nospam@infograph.com> wrote in message
    news:eJ59ffOmDHA.372@TK2MSFTNGP11.phx.gbl...
    > What is that ActiveX componenet called? Where do I get that ActiveX
    > component?
    >
    >
    > "Ray at <%=sLocation%>" <myfirstname at lane34 dot com> wrote in message
    > news:u2YeUTOmDHA.3256@tk2msftngp13.phx.gbl...
    > > That's because Windows Update uses an activeX control that is installed
    on
    > > your computer the first time you go to the site, assuming you accept the
    > > installation.
    > >
    > > Ray at work
    > >
    > > "IGC" <nospam@infograph.com> wrote in message
    > > news:%23wDjQQOmDHA.3320@tk2msftngp13.phx.gbl...
    > > > Other than ASP, what can? There must be something out there that
    does.
    > > > When I download patches from MS and I get disconnected mid-stream, it
    > > knows
    > > > that I did and will continue downloading. Then it does an install
    after
    > > the
    > > > download completes. Then the page redirects to a install complete
    page.
    > > > Although I don't need to do an actual install, I do NEED to know when
    > the
    > > > download successfully completes.
    > > >
    > > >
    > > >
    > > > "Aaron Bertrand - MVP" <aaron@TRASHaspfaq.com> wrote in message
    > > > news:eCUZq%23NmDHA.1948@TK2MSFTNGP12.phx.gbl...
    > > > > > I have a requirement to record in a database when a file is
    finished
    > > > > > downloading to the end-user.
    > > > >
    > > > > Sorry, ASP can't detect this. You could try
    > response.isClientConnected
    > > > but
    > > > > that only refers to the web page... e.g. if they close the browser
    > > window
    > > > > and continue the download, you will get a false negative.
    > > > >
    > > > > A
    > > > >
    > > > >
    > > >
    > > >
    > >
    > >
    >
    >

    Ray at Guest

  8. #7

    Default Re: knowing when a file download is complete

    Use the Response.BinaryWrite method to stream the file out from the ASP
    page?
    You may get an error generated if the client disconnects prematurely (should
    see a doctor perhaps) eg. before the entire file has been streamed out?

    Chris.

    "IGC" <nospam@infograph.com> wrote in message
    news:eIfNCiNmDHA.1244@TK2MSFTNGP11.phx.gbl...
    I have a requirement to record in a database when a file is finished
    downloading to the end-user. Currently when a user clicks a download icon
    for a file it directs to an ASP page that records the "hit" into a database,
    then I use a response.redirect "filename.exe" to point the user to the
    download. What I'm missing is knowing when the download is complete so I
    can update the database to show the file successfully completed its
    download. Is there a way to do this with ASP? A way to do this with an
    aftermarket component?



    Chris Barber Guest

  9. #8

    Default Re: knowing when a file download is complete

    I found it!!!

    Informentum has a product called ActiveFile which allows me to download a
    file from ASP and know wether or not it worked.

    Simply:

    Dim result, File1
    Set File1 = Server.CreateObject("ActiveFile.File")
    File1.Name = "D:\MyDocuments\program.exe"
    Response.Clear
    Response.AddHeader "Content-Disposition", "attachment; filename=" &
    File1.FileName
    result = File1.Download
    Set File1 = Nothing

    Now "result" is true or false depending if the entire file is downloaded.
    Very cool indeed!!

    Thanks for all your help!

    "IGC" <nospam@infograph.com> wrote in message
    news:eIfNCiNmDHA.1244@TK2MSFTNGP11.phx.gbl...
    > I have a requirement to record in a database when a file is finished
    > downloading to the end-user. Currently when a user clicks a download icon
    > for a file it directs to an ASP page that records the "hit" into a
    database,
    > then I use a response.redirect "filename.exe" to point the user to the
    > download. What I'm missing is knowing when the download is complete so I
    > can update the database to show the file successfully completed its
    > download. Is there a way to do this with ASP? A way to do this with an
    > aftermarket component?
    >
    >

    IGC Guest

  10. #9

    Default Re: knowing when a file download is complete

    No, but I'm sure I read recently that you could download something similar.

    I'm sure that BITS could be incorporated into something.
    [url]http://www.microsoft.com/downloads/details.aspx?displaylang=en&familyid=AD9FB937-62F9-4B9F-993B-F754F968B8A6[/url]

    [url]http://tinyurl.com/rzat[/url]

    and the documentation
    [url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/bits/bits/bits_start_page.asp?frame=true[/url]
    [url]http://tinyurl.com/rzau[/url]


    "Ray at <%=sLocation%>" <myfirstname at lane34 dot com> wrote in message
    news:uIJj1hOmDHA.744@tk2msftngp13.phx.gbl...
    > It's called Windows Update, and Microsoft made it for the Windows Update
    > site. It's not something you can download and use for your own site or
    > anything like that.
    >
    > Ray at work
    >
    > "IGC" <nospam@infograph.com> wrote in message
    > news:eJ59ffOmDHA.372@TK2MSFTNGP11.phx.gbl...
    > > What is that ActiveX componenet called? Where do I get that ActiveX
    > > component?
    > >
    > >
    > > "Ray at <%=sLocation%>" <myfirstname at lane34 dot com> wrote in message
    > > news:u2YeUTOmDHA.3256@tk2msftngp13.phx.gbl...
    > > > That's because Windows Update uses an activeX control that is
    installed
    > on
    > > > your computer the first time you go to the site, assuming you accept
    the
    > > > installation.
    > > >
    > > > Ray at work
    > > >
    > > > "IGC" <nospam@infograph.com> wrote in message
    > > > news:%23wDjQQOmDHA.3320@tk2msftngp13.phx.gbl...
    > > > > Other than ASP, what can? There must be something out there that
    > does.
    > > > > When I download patches from MS and I get disconnected mid-stream,
    it
    > > > knows
    > > > > that I did and will continue downloading. Then it does an install
    > after
    > > > the
    > > > > download completes. Then the page redirects to a install complete
    > page.
    > > > > Although I don't need to do an actual install, I do NEED to know
    when
    > > the
    > > > > download successfully completes.
    > > > >
    > > > >
    > > > >
    > > > > "Aaron Bertrand - MVP" <aaron@TRASHaspfaq.com> wrote in message
    > > > > news:eCUZq%23NmDHA.1948@TK2MSFTNGP12.phx.gbl...
    > > > > > > I have a requirement to record in a database when a file is
    > finished
    > > > > > > downloading to the end-user.
    > > > > >
    > > > > > Sorry, ASP can't detect this. You could try
    > > response.isClientConnected
    > > > > but
    > > > > > that only refers to the web page... e.g. if they close the browser
    > > > window
    > > > > > and continue the download, you will get a false negative.
    > > > > >
    > > > > > A
    > > > > >
    > > > > >
    > > > >
    > > > >
    > > >
    > > >
    > >
    > >
    >
    >

    Tom B Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139