Search the web
Sign In
New User? Sign Up
active-server-pages · Active Server Pages Developers' List
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Want your group to be featured on the Yahoo! Groups website? Add a group photo to Flickr.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
RC4 Encryption   Message List  
Reply | Forward Message #12388 of 12411 |
RE: [ASP] (push-)Downloading from IE

Hi Moshe,

Change this:
Response.ContentType = "text/csv"
To this:
Response.ContentType = "application/x-msdownload"

This is the only way to consistently "force" a download in IE. Otherwise
the contenttype header MUST match a registry key for an application that
supports that specific content-type AND have shell permissions to be
invoked in that manner. If not, it'll either be interpreted as text
(which is just downright rude for HTML and EXE files) or it'll "bounce"
(an error will usually appear with the garbage message you're seeing).

You can check the useragent header for IE and only send this contenttype
header if the UA is IE if you prefer, but since all other browsers
support this value, too, as an automatic download there really isn't a
reason to do all that.

-Shawn





Wed May 6, 2009 3:40 am

shawn_ra
Online Now Online Now
Send Email Send Email

Forward
Message #12388 of 12411 |
Expand Messages Author Sort by Date

Hey guys Anyone still around here? I have an issue that's really been messing with my head! I have a ready-made function for RC4 encryption. Then it converted...
Moshe Tapnack
tapnack
Offline Send Email
Apr 19, 2009
10:57 pm

Hi Moshe, ... Yep. :) ... Sounds like it's one of either two problems: * The characters in the first implementation are a different charset than in the second...
Shawn K. Hall
shawn_ra
Online Now Send Email
Apr 20, 2009
2:49 am

Hey Shawn Good to hear from you! And especially with as detailed a reply! Both interfaces are UTF8, but I will check what the database is. I assume that that...
Moshe Tapnack
tapnack
Offline Send Email
Apr 20, 2009
9:34 pm

Hey there I have a script that should download a CSV file from the browser. It works perfectly on Firefox and Chrome - but on IE(v7) it chokes and throws and ...
Moshe Tapnack
tapnack
Offline Send Email
May 5, 2009
7:00 pm

You're getting an IE error, but have shown a script that we are not going to be able to run. This is not going to allow analysis. What you need to provide is...
David Smart
smartware_co...
Offline Send Email
May 5, 2009
9:48 pm

Hi Dave There is no HTML - it's a purely ASP server side page - its responsing to the CSV file. And in FF the script works perfectly anyway... ... From:...
Moshe Tapnack
tapnack
Offline Send Email
May 5, 2009
10:54 pm

Hi Moshe, Change this: Response.ContentType = "text/csv" To this: Response.ContentType = "application/x-msdownload" This is the only way to consistently...
Shawn K. Hall
shawn_ra
Online Now Send Email
May 6, 2009
3:40 am

Hi Shawn A VERY belated thank you for this reply - I was away on reserve duty, vacation, and a little work time in-between the 2... and I have just tried this...
Moshe Tapnack
tapnack
Offline Send Email
Aug 9, 2009
3:03 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help