Image Loading in c# from a web URL
<p>am trying to display an image in a "toolStrip" i c# from a weburl. Am using the following methode to get the image </p>

<pre><code>WebRequest requestPic5 = WebRequest.Create(icon_path);
                         requestPic5.Timeout = 5000;
                         WebResponse responsePic5 = null;
                         Image Myimg5 = null;

if (requestPic5 != null)
   {
      responsePic5 = requestPic5.GetResponse();
      if (responsePic5 != null)
         {
            Myimg5 = Image.FromStream(responsePic5.GetResponseStream());
          }
   }
</code></pre>

<p>its failing when  <code>Myimg5 = Image.FromStream(responsePic5.GetResponseStream());</code> throws an exception but the image is still there in the url </p>

<p>But unfortunately most of the time its not loading properly and sometimes throwing a 404 error </p>
