469,626 Members | 996 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,626 developers. It's quick & easy.

knowing when a file download is complete

IGC
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?
Jul 19 '05 #1
8 2733
> 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
Jul 19 '05 #2
IGC
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" <aa***@TRASHaspfaq.com> wrote in message
news:eC****************@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

Jul 19 '05 #3
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" <no****@infograph.com> wrote in message
news:%2****************@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" <aa***@TRASHaspfaq.com> wrote in message
news:eC****************@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


Jul 19 '05 #4
IGC
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:u2**************@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" <no****@infograph.com> wrote in message
news:%2****************@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" <aa***@TRASHaspfaq.com> wrote in message
news:eC****************@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



Jul 19 '05 #5
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" <no****@infograph.com> wrote in message
news:eJ*************@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:u2**************@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" <no****@infograph.com> wrote in message
news:%2****************@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" <aa***@TRASHaspfaq.com> wrote in message
news:eC****************@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
>
>



Jul 19 '05 #6
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" <no****@infograph.com> wrote in message
news:eI**************@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?

Jul 19 '05 #7
IGC
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" <no****@infograph.com> wrote in message
news:eI**************@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?

Jul 19 '05 #8
No, but I'm sure I read recently that you could download something similar.

I'm sure that BITS could be incorporated into something.
http://www.microsoft.com/downloads/d...B-F754F968B8A6

http://tinyurl.com/rzat

and the documentation
http://msdn.microsoft.com/library/de...asp?frame=true
http://tinyurl.com/rzau
"Ray at <%=sLocation%>" <myfirstname at lane34 dot com> wrote in message
news:uI*************@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" <no****@infograph.com> wrote in message
news:eJ*************@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:u2**************@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" <no****@infograph.com> wrote in message
news:%2****************@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" <aa***@TRASHaspfaq.com> wrote in message
> news:eC****************@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
> >
> >
>
>



Jul 19 '05 #9

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

8 posts views Thread by Philipp Brune | last post: by
1 post views Thread by mrhaydel | last post: by
1 post views Thread by Slackydude | last post: by
nathj
21 posts views Thread by nathj | last post: by
2 posts views Thread by barthelemy.von.haller | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.