image control not refresh the stream when saving snapshot images to avi file - ASP.net, C#, AForge.net
<p><br />  I am trying to get a snapshot from MJPEG stream of a Panasonic IP Camera and save all the jpeg snaphot image to avi file as a video file while the live video stream is loading to an image control of asp.net using aforge.net, and now I am facing a problem as the following: <br /><br /> - the live video stream stops loading while getting the snapshot using webresponse. <br /> <br/> Below is the codes: <br/> </p>

<pre><code>try
{
    WebRequest request = WebRequest.Create(SnapShotURL);
    request.Credentials = new NetworkCredential(txtUserName.Text.Trim(), txtPassword.Text.Trim());
    response = request.GetResponse();
    Stream responseStream = response.GetResponseStream();
    bmpSnapshot = new Bitmap(responseStream);
}
catch (Exception ex)
{
}
finally
{
    imgStream.ImageUrl = "";
    response.Close();
}
</code></pre>

<p>Your help is highly appreciated.</p>
