GIDForums  

Go Back   GIDForums > Computer Programming Forums > .NET Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 21-Jul-2009, 12:18
nawillis nawillis is offline
New Member
 
Join Date: Jul 2009
Posts: 1
nawillis is on a distinguished road

MIME download of excel file will not always save to Desktop


I have a very simple website that is accessed by a link in a portlet. It is an ASP.Net 2.0 application coded in VB.Net 2005. IE is the "preferred" browser.

On inital load, the website displays a report. The user can click a button to perform a Mime download of an excel file.

Before the report displays, a mixed-content warning is displayed. Getting rid of this warning is probably beyond my control. Also, I have no control over users browser settings.

This is the code I am using for the download:
Response.ClearHeaders()
Response.ClearContent()
Response.Clear()
Response.AddHeader("Content-Disposition", "Attachment;Filename=IRpt.xls")
Response.ContentType = mimeType
Response.BinaryWrite(bytes)

I have the following problem when trying to save this excel file from the download popup:

If I anwswer "Yes" to the warning "This page contains both secure and non-secure items. Do you want to download the non-secure items?", the report displays correctly and the excel file downloads and save correctly.

If I answer "No" to this warning, the report displays correctly. However, if I try to save to Desktop from the download prompt, no file is created, although there is no warning or message. There is an unresolvable link in "My Recent Documents".
If I try to save to My Documents, the file saves correctly. After that, it will save to any location, including Desktop. But if I clear the IE cache with shift-F5, I get the original problem back again.

Can anybody tell me why this is happening, and what to do about it?
  #2  
Old 21-Jul-2009, 15:12
TurboPT's Avatar
TurboPT TurboPT is offline
Senior Member
 
Join Date: Feb 2006
Location: Atlanta, GA
Posts: 1,140
TurboPT is a jewel in the roughTurboPT is a jewel in the roughTurboPT is a jewel in the rough

Re: MIME download of excel file will not always save to Desktop


Might this be related?

The 'ContentType' differs.
__________________
Use the force...read the source!!
WYCIWYG -- what you code is what you get!
 
 

Recent GIDBlogAccepted for Ph.D. program by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Power Calibration Error In Nero Fix (hopefully) matt3678 Computer Hardware Forum 60 20-Aug-2009 06:04
Airport Log program using 3D linked List : problem reading from file batrsau C Programming Language 11 29-Feb-2008 08:44
After execution - Error cannot locate /Skin File? WSCH C++ Forum 1 05-Mar-2005 21:03
[Tutorial] Standard I/O aaroncohn C Programming Language 20 27-Feb-2004 22:07

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 16:11.


vBulletin, Copyright © 2000 - 2009, Jelsoft Enterprises Ltd.