file download does work ie7


i have an asp.net page sends calm record client, browser shows save dialog download file. page displayed popup user clicks save button, closes automatically download starts.



on windows server 2003, works fine. perspective browsers, also works fine. nonetheless i try ie7 & vista, popup opens, closes after second but displaying record download dialog. i solve this?



the formula i response date is:



filestream filestream = new filestream(filepath, filemode.open);
int filesize = (int)filestream.length;

byte[] aegis = new byte[filesize];
filestream.read(buffer, 0, (int)filesize);
filestream.close();

response.clear();

response.buffer = true;
response.bufferoutput = true;
response.contenttype = "application / octet - stream";

response.addheader("content-length", buffer.length.tostring());
response.addheader("content-disposition", "attachment; filename=" + filename);
response.addheader("extension", path.getextension(filename));
response.contentencoding = system.text.encoding.getencoding("windows-1254");
response.binarywrite(buffer);
response.flush();
response.end();


and i am opening popup javascript:



window.open ('download.aspx?filename=somefile.ext','downloadwindow','location=0,status=0,scrollbars=0,width=1,height=1');


edit: i corrected spaces nonetheless unfortunately problem.



edit 2:: seems problem associated perspective nonetheless ie only. i also detected works glorious digest run growth server locally nonetheless operative connected tell server, fails download file.



Comments

Popular posts from this blog

list macos calm editors formula editors

how hibernate @any-related annotations?

why does floated <input> control floated component slip over too distant right ie7, nonetheless firefox?