Click here to Skip to main content
16,016,500 members
Home / Discussions / Web Development
   

Web Development

 
AnswerRe: File download without redirecting Pin
Shog91-Jul-06 7:06
sitebuilderShog91-Jul-06 7:06 
AnswerRe: File download without redirecting Pin
saqib_saeed2-Jul-06 5:09
saqib_saeed2-Jul-06 5:09 
AnswerRe: File download without redirecting Pin
Edbert P2-Jul-06 15:36
Edbert P2-Jul-06 15:36 
QuestionNEED HELP! - Simple string manipulation Pin
VK-Cadec30-Jun-06 5:50
VK-Cadec30-Jun-06 5:50 
AnswerRe: NEED HELP! - Simple string manipulation Pin
Guffa1-Jul-06 4:03
Guffa1-Jul-06 4:03 
GeneralRe: NEED HELP! - Simple string manipulation Pin
VK-Cadec3-Jul-06 3:44
VK-Cadec3-Jul-06 3:44 
GeneralRe: NEED HELP! - Simple string manipulation Pin
RichardGrimmer4-Jul-06 1:18
RichardGrimmer4-Jul-06 1:18 
QuestionBinaryWrite and the "Action canceled" page Pin
Chris Losinger30-Jun-06 5:31
professionalChris Losinger30-Jun-06 5:31 
i'm trying to do a BinaryWrite to push documents from the server to the user. the code looks like this:
' fileName and filePath come from the quesrystring

Response.Clear

if Not IsNull(InStr(UCase(filePath), ".PDF")) then
    Response.ContentType = "application/pdf"
else
    Response.ContentType = "application/x-msdownload"
end if

Response.CharSet = ""

fn = Server.MapPath(filePath)
ctFn = "filename=" & fileName 
    
Response.AddHeader "Content-transfer-encoding", "binary" 
Response.AddHeader "Content-Disposition","attachment; " & ctFn
	
Set adoStream = CreateObject("ADODB.Stream") 
adoStream.Open() 
adoStream.Type = 1 
adoStream.LoadFromFile(fn) 
Response.BinaryWrite adoStream.Read() 
	
adoStream.Close 
Set adoStream = Nothing 

Response.End 


our Windows application has an IE control which has a page with links to the .ASP script above. the script lives on our server, along with the documents we need to push.

here's the issue:

when the user hits a link in the contained IE instance, and there is already an external IE window open somewhere (outside our app - like, for example, the IE window i'm typing in right now), that IE window will get focus, and will apparently grab the incoming file and pass it onto the OS. for example: if it's downloading a PDF file, that external IE window will jump to the front, sit there, handle the download, and then Acrobat will appear and handle the PDF - the IE page doesn't change at all.

but, if there is no external IE window open anywhere, a new one is created, and it will handle the download. most of the time, that IE window will immediately vanish. but sometimes (maybe with small files only?), that IE will stay up, with an "Action canceled" message on it. the download will still succeed, but that IE window sits there, scaring the user.

so, it looks like the new IE instance gets this attachment, but no HTML, and assumes that it got a failed transfer ?

i'm using IE6.0.

as far as i can tell with Google, a lot of people on the web have reported this exact problem. but nobody's ever posted a solution.


Cleek | Image Toolkits | Thumbnail maker

AnswerRe: BinaryWrite and the "Action canceled" page Pin
Shog930-Jun-06 15:56
sitebuilderShog930-Jun-06 15:56 
GeneralRe: BinaryWrite and the "Action canceled" page Pin
Chris Losinger30-Jun-06 20:15
professionalChris Losinger30-Jun-06 20:15 
GeneralRe: BinaryWrite and the "Action canceled" page Pin
Shog91-Jul-06 5:48
sitebuilderShog91-Jul-06 5:48 
GeneralRe: BinaryWrite and the "Action canceled" page Pin
Chris Losinger1-Jul-06 6:37
professionalChris Losinger1-Jul-06 6:37 
GeneralRe: BinaryWrite and the "Action canceled" page Pin
Shog91-Jul-06 6:59
sitebuilderShog91-Jul-06 6:59 
GeneralRe: BinaryWrite and the "Action canceled" page [modified] Pin
Chris Losinger1-Jul-06 7:11
professionalChris Losinger1-Jul-06 7:11 
GeneralRe: BinaryWrite and the "Action canceled" page Pin
Shog91-Jul-06 7:37
sitebuilderShog91-Jul-06 7:37 
AnswerRe: BinaryWrite and the "Action canceled" page Pin
Edbert P2-Jul-06 15:33
Edbert P2-Jul-06 15:33 
GeneralRe: BinaryWrite and the "Action canceled" page Pin
Chris Losinger2-Jul-06 16:10
professionalChris Losinger2-Jul-06 16:10 
QuestionHow to retrieve data stored on a different server... Pin
aspwizkid29-Jun-06 20:46
aspwizkid29-Jun-06 20:46 
QuestionBeginner Question about Firefox Controls Pin
Richard Andrew x6429-Jun-06 9:26
professionalRichard Andrew x6429-Jun-06 9:26 
QuestionOpening new windows from ASP Pin
mjackson1129-Jun-06 8:29
mjackson1129-Jun-06 8:29 
AnswerRe: Opening new windows from ASP Pin
ketankumar29-Jun-06 21:01
ketankumar29-Jun-06 21:01 
GeneralRe: Opening new windows from ASP Pin
mjackson1130-Jun-06 2:41
mjackson1130-Jun-06 2:41 
QuestionDesign Patterns Pin
shireenkhera@gmail.com29-Jun-06 7:44
shireenkhera@gmail.com29-Jun-06 7:44 
AnswerRe: Design Patterns Pin
Guffa29-Jun-06 8:26
Guffa29-Jun-06 8:26 
QuestionHow to write flash games Pin
Brent Lamborn29-Jun-06 4:35
Brent Lamborn29-Jun-06 4:35 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.