473,395 Members | 1,516 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Bad Gift from MS in December 2006

Great thanks to MS, the code written several months ago and working just
perfectly before December 2006 suddenly stopped working generating errors or
downloading trash instead of real data. Nice security patch, guys!

The code in the aspx page codebehind file is very simple.

Response.Clear();
Response.Buffer = true;
Response.Expires = 0;
Response.ContentType = "application/zip";
Response.AddHeader("Content-Disposition",
"attachment;filename=SomeFileName.zip");
Response.AddHeader("Content-transfer-encoding", "binary");
Response.BinaryWrite(SomeByteArrayBuffer);
Response.Flush();

It was working just great, but now it returns corrupted binary files. Zip
can't open them at all, WinRar complains about "unexpected end of archive"
but nevertheless shows the content of the archived file. Another one
problem - I provide the link to our WinApp to let the client download and
install it. When I click this link working on localhost it works perfectly
and I can DL this file.
When I upload the same app to our working server, regardless of VPN
connection, trusted web site list or whatever I'm not able even to download
the WinApp file, when I click the link on my own aspx page the IE starts
downloading it, but the actual size of this file is longer than the real
size of the real app located on the server. After this try the IE complaints
that it's not able to download the file, the file doesn't exist or something
else. BSH! It was working just perfectly a month ago! What M$ did to crash
everything down? Is it really called critical system update, permission
issue or smth like that? Anyway, how can we get the same code working before
to work again? As usual M$ never provides example or explanations, just bugs
calling them fixes.

Just D.
Jan 10 '07 #1
2 1138
My first move would be rather to save the file and perform a size (and if
applicable byte) comparison (for example using the "fc" command)...

I would also try :
- to remove the content-transfer-encoding header
- what if using an already done stored on disk zip file ?
- you could also use Response.End instead of flush in case you have some
extra bytes written after the file

Patrice

"Just D." <no@spam.pleasea écrit dans le message de news:
Ov**************@TK2MSFTNGP04.phx.gbl...
Great thanks to MS, the code written several months ago and working just
perfectly before December 2006 suddenly stopped working generating errors
or downloading trash instead of real data. Nice security patch, guys!

The code in the aspx page codebehind file is very simple.

Response.Clear();
Response.Buffer = true;
Response.Expires = 0;
Response.ContentType = "application/zip";
Response.AddHeader("Content-Disposition",
"attachment;filename=SomeFileName.zip");
Response.AddHeader("Content-transfer-encoding", "binary");
Response.BinaryWrite(SomeByteArrayBuffer);
Response.Flush();

It was working just great, but now it returns corrupted binary files. Zip
can't open them at all, WinRar complains about "unexpected end of archive"
but nevertheless shows the content of the archived file. Another one
problem - I provide the link to our WinApp to let the client download and
install it. When I click this link working on localhost it works perfectly
and I can DL this file.
When I upload the same app to our working server, regardless of VPN
connection, trusted web site list or whatever I'm not able even to
download the WinApp file, when I click the link on my own aspx page the IE
starts downloading it, but the actual size of this file is longer than the
real size of the real app located on the server. After this try the IE
complaints that it's not able to download the file, the file doesn't exist
or something else. BSH! It was working just perfectly a month ago! What M$
did to crash everything down? Is it really called critical system update,
permission issue or smth like that? Anyway, how can we get the same code
working before to work again? As usual M$ never provides example or
explanations, just bugs calling them fixes.

Just D.


Jan 10 '07 #2
1. Respond.End() doesn't help and actually it's even worst.
2. I found the real reason. Small files are still working. Since I'm
transferring XML files the compression ratio is terrible and I finally
notices that the files over 4 MBytes, in my case 6 Mbytes are coming
corrupted. IIS has a limitation of 4 MBytes to the attached files, fixable
in Machine.Config file. I didn't play deeper yet, but I got a very strong
feeling that MS added a context control for the archives attached by IIS and
the uncompressed file just overruns the buffer available for this operation.
Repeat again - smaller files works perfectly.

Just D.

"Patrice" <http://www.chez.com/scribe/wrote in message
news:ej**************@TK2MSFTNGP06.phx.gbl...
My first move would be rather to save the file and perform a size (and if
applicable byte) comparison (for example using the "fc" command)...

I would also try :
- to remove the content-transfer-encoding header
- what if using an already done stored on disk zip file ?
- you could also use Response.End instead of flush in case you have some
extra bytes written after the file

Patrice

"Just D." <no@spam.pleasea écrit dans le message de news:
Ov**************@TK2MSFTNGP04.phx.gbl...
>Great thanks to MS, the code written several months ago and working just
perfectly before December 2006 suddenly stopped working generating errors
or downloading trash instead of real data. Nice security patch, guys!

The code in the aspx page codebehind file is very simple.

Response.Clear();
Response.Buffer = true;
Response.Expires = 0;
Response.ContentType = "application/zip";
Response.AddHeader("Content-Disposition",
"attachment;filename=SomeFileName.zip");
Response.AddHeader("Content-transfer-encoding", "binary");
Response.BinaryWrite(SomeByteArrayBuffer);
Response.Flush();

It was working just great, but now it returns corrupted binary files. Zip
can't open them at all, WinRar complains about "unexpected end of
archive" but nevertheless shows the content of the archived file. Another
one problem - I provide the link to our WinApp to let the client download
and install it. When I click this link working on localhost it works
perfectly and I can DL this file.
When I upload the same app to our working server, regardless of VPN
connection, trusted web site list or whatever I'm not able even to
download the WinApp file, when I click the link on my own aspx page the
IE starts downloading it, but the actual size of this file is longer than
the real size of the real app located on the server. After this try the
IE complaints that it's not able to download the file, the file doesn't
exist or something else. BSH! It was working just perfectly a month ago!
What M$ did to crash everything down? Is it really called critical system
update, permission issue or smth like that? Anyway, how can we get the
same code working before to work again? As usual M$ never provides
example or explanations, just bugs calling them fixes.

Just D.



Jan 10 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Peter Childs | last post by:
Thought this might intrest any Postgres Users in the South East England area. The main talk at this meeting is on Postgres Vs MySql. Peter Childs -------- Original Message -------- Subject:...
6
by: Janaka | last post by:
No this isn't spam! :) I'm currently developing a gift voucher system for an ecommerce retailer. The vouchers may be emailed to customers or printed and sent along with postage. Either way the...
0
by: aol12131 | last post by:
{©¿©} www.gift.boxke.net <<
10
by: Ken | last post by:
I have a form, that when I open it, it shows all items that are due for inspection in the current month and that is overdue. This is shown in continuous view and it has a column that shows overdue...
5
by: veki | last post by:
Hello, What shoud I change in this code to check, if some number is december: #include <iostream> #include <stdio.h> using namespace std; int main(){
0
by: =?Utf-8?B?TG9jbyBNZXRhbCBIZWFk?= | last post by:
Well, I am basically wondering if microsoft has any type of credit card or a gift card available. I have looked around and not seen a trace of one but I think it would be really nice to have one.
0
by: aw | last post by:
Hello, I am a psychology student at University of Chicago conducting a survey on animals, technology, and nature. It takes only 5-10 minutes to complete and every 20th participant will be...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.