After weeks of working on a server I have problems that I attributed to ASyncStreams in the first phase.
But after a lot of testing and a lot of time I realized that the problem is on file.ReadBytes.
In debug mode, I read a file from dirAsstes (or from DitTemp) and it tells me the right size and loads it correctly.
But in release mode the file is bigger looking at it with File.Size (Dir, fileName) and in fact with file.ReadBytes it produces me a bigger array.
Why?
At first glance it would appear to add 6220 bytes at the end, but in reality it doesn't.
I am attaching an example that you can try. This I get from the Debug Logs:
In release instead
PS. It happens to me with PNG or JPG files. It does not happen when reading text files. And I put in DirAssets a file with extension .bin and it didn't give me this problem.
But after a lot of testing and a lot of time I realized that the problem is on file.ReadBytes.
In debug mode, I read a file from dirAsstes (or from DitTemp) and it tells me the right size and loads it correctly.
But in release mode the file is bigger looking at it with File.Size (Dir, fileName) and in fact with file.ReadBytes it produces me a bigger array.
Why?
At first glance it would appear to add 6220 bytes at the end, but in reality it doesn't.
I am attaching an example that you can try. This I get from the Debug Logs:
Application_Start
Application_Active
Logo.png Size :76361
In release instead
Logo.png Size :82851
PS. It happens to me with PNG or JPG files. It does not happen when reading text files. And I put in DirAssets a file with extension .bin and it didn't give me this problem.
Attachments
Last edited: