By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,665 Members | 2,646 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,665 IT Pros & Developers. It's quick & easy.

Download under a different filename

P: n/a
My problem is: i need to write an ASP page which first checks whether
the user has permissions to download a ZIP file, and then streams the
file itself if the user is allowed to see it. I have succeeded until
this point, but the client browser asks to save the file with the
original filename (and ASP extension). Obviously this would mean
making the downloaded file unusable at client side, unless I tell the
site user to manually rename it, but this is not a solution.

So I ask you: is there any way for an ASP page to stream data to the
browser and have it saved with a default file name and extension which
are different from the page's ones?

I have tried a PHP-like solution:
http://server/path/page.asp/virtual.zip but IIS seems not to
understand the trick.

Thanks in advance to anyone who might reply this post!
Andrea Azzini
Jul 21 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Something like this will work. You can rename the file on the fly to
whatever you want.
http://www.darkfalz.com/1098
--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"andylong :: andrea : azzini" <an******@andylong.cjb.net> wrote in message
news:%2******************@TK2MSFTNGP14.phx.gbl...
My problem is: i need to write an ASP page which first checks whether
the user has permissions to download a ZIP file, and then streams the
file itself if the user is allowed to see it. I have succeeded until
this point, but the client browser asks to save the file with the
original filename (and ASP extension). Obviously this would mean
making the downloaded file unusable at client side, unless I tell the
site user to manually rename it, but this is not a solution.

So I ask you: is there any way for an ASP page to stream data to the
browser and have it saved with a default file name and extension which
are different from the page's ones?

I have tried a PHP-like solution:
http://server/path/page.asp/virtual.zip but IIS seems not to
understand the trick.

Thanks in advance to anyone who might reply this post!
Andrea Azzini

Jul 21 '05 #2

P: n/a
works perfectly! thanks you very much!

"Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message
news:%2***************@TK2MSFTNGP11.phx.gbl...
Something like this will work. You can rename the file on the fly to
whatever you want.
http://www.darkfalz.com/1098
--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"andylong :: andrea : azzini" <an******@andylong.cjb.net> wrote in message
news:%2******************@TK2MSFTNGP14.phx.gbl...
My problem is: i need to write an ASP page which first checks whether
the user has permissions to download a ZIP file, and then streams the
file itself if the user is allowed to see it. I have succeeded until
this point, but the client browser asks to save the file with the
original filename (and ASP extension). Obviously this would mean
making the downloaded file unusable at client side, unless I tell the
site user to manually rename it, but this is not a solution.

So I ask you: is there any way for an ASP page to stream data to the
browser and have it saved with a default file name and extension which
are different from the page's ones?

I have tried a PHP-like solution:
http://server/path/page.asp/virtual.zip but IIS seems not to
understand the trick.

Thanks in advance to anyone who might reply this post!
Andrea Azzini


Jul 21 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.