The client code works, I have tested it by commenting on line 17 in the Handle Code (highlighted),
after execution a blank image (xxx.jpg) is created at the address sDirDL when IN as Inputstream has no data.
Additionally, the application cannot reach the client code, because it crashed on line 17 of the handle code.
Regarding the addresses, I have changed the names of the addresses for safety's sake for unrecognizability.
So the error is certainly on the highlight line 17 in the Handle Code, the Client Code works!
Thus, it is 'Resp.OutputStream.WriteBytes(Buf, 0, Buf.Length - 1)' that is the highligted line. I have tested with Buf.length without -1, gets the same error.
What is wrong?