I am working on a ASP.NET web application that tryies to download some files from a remote server by login the server. While I try to download a file it works fine with small files but a It shows following exception while downloading a file of 750 KB.

I m defining the HTTPRequest Timout = System.Threading.Timeout.Infinite;
I m reading the files from server using this code
byte[] buffer = new byte[32768];
using (Stream input = getResponse.GetResponseStream())
{
using (FileStream output = new FileStream(saveTo1, FileMode.OpenOrCreate))
{
int bytesRead;
while ((bytesRead = input.Read(buffer, 0, buffer.Length)) > 0)
{
output.Write(buffer, 0, bytesRead);
}
}
}
What could possible be creating this problem?
Also When I click on
IgnoreorContinueIt continues the download smoothly further. How can I overcome this problem?
Thanks in Advance. :)