Wrong file size after upload
am 28.09.2007 15:32:22 von Oliver Tengler
Hi,
please help me with a strange problem:
I use the WebDav extension in IIS6 to upload files. This works
flawlessly except for a file called "MSB1CACH.LEX". I think this file
belongs to the Microsoft Office suite. This particular file is 1536
bytes in size but after uploading it its size changes to 2560. 1024 more
than the original.
This happens if a use the Windows Explorer and also if I use our own
WebDav enabled application (which is written from scratch using WinHTTP).
I tracked down the problem to a special sequence of bytes the file
starts with: D0,CF,11,E0,A1,B1,1A,E1. This seems to be the 'magic' of a
structured storage file'. If I change for instance the byte number eight
from 'E1' to 'E0' the file copies with the right size.
After some network sniffing it turned out that the data is sent and
received correctly. So some component on my IIS server is modifying the
file.
Any ideas what is going on here?
Thanks!
Oliver
Re: Wrong file size after upload
am 28.09.2007 16:28:19 von Kristofer Gafvert
Is this an error (something breaks because of this) or just an
observation? I have seen many times that when i transfer files to and from
server of different OSes and different file systems, the size changes. But
it is never a problem.
--
Regards,
Kristofer Gafvert
http://www.gafvert.info/iis/ - IIS Related Info
Oliver Tengler wrote:
>Hi,
>
>please help me with a strange problem:
>I use the WebDav extension in IIS6 to upload files. This works flawlessly
>except for a file called "MSB1CACH.LEX". I think this file belongs to the
>Microsoft Office suite. This particular file is 1536 bytes in size but
>after uploading it its size changes to 2560. 1024 more than the original.
>This happens if a use the Windows Explorer and also if I use our own
>WebDav enabled application (which is written from scratch using WinHTTP).
>I tracked down the problem to a special sequence of bytes the file starts
>with: D0,CF,11,E0,A1,B1,1A,E1. This seems to be the 'magic' of a
>structured storage file'. If I change for instance the byte number eight
>from 'E1' to 'E0' the file copies with the right size.
>After some network sniffing it turned out that the data is sent and
>received correctly. So some component on my IIS server is modifying the
>file.
>Any ideas what is going on here?
>
>Thanks!
>Oliver
Re: Wrong file size after upload
am 28.09.2007 20:16:03 von Oliver Tengler
Kristofer Gafvert wrote:
> Is this an error (something breaks because of this) or just an
> observation? I have seen many times that when i transfer files to and
> from server of different OSes and different file systems, the size
> changes. But it is never a problem.
>
Thanks for answering.
I can't tell for the particular .LEX file but other files (doc files
from MS-Word) which also show this behavior seem to be ok.
But this behavior breaks our software which depends on the size and the
CRC32 checksum of the transfered files.
If you compare the original and the modified version of the file you see
that the differences are all over the file. Not only the beginning or
end. How can that possibly be a normal behavior?
Oliver