Sometimes IIS gives you HTTP500 server error when trying to write binary data to response (Response.BinaryWrite). Thats because the data is exceeding the buffer limit size. Solution is to increase the limit size (I think default is 4MB). To increase the buffering limit in IIS 6, follow these steps: Click Start, click Run, type cmd, and then click OK. […]