title: Silverlight and ASP.net Bitmap converting issue
body: <p>my application take snapshots using webcam and save them in a local folder. so i'm using following code to convert my Silverlight Snapshot to a byte array and send it through the Web Service. name of my web service is ImageService.
  <p></p>
  
  <pre><code>ImageServiceSoapClient client = new ImageServiceSoapClient();
  
  private void source_CaptureImageCompleted(object sender, CaptureImageCompletedEventArgs e)
          {            
              WriteableBitmap bmp = new WriteableBitmap(320, 240);
              bmp = e.Result;
              byte[] buffer = bmp.ToByteArray();            
  
              client.SaveImageToLocalAsync(buffer, txtUserName.Text);            
          }
  </code></pre>
  
  <p><p>
  and this is my server side code..</p>
  
  <pre><code>[WebMethod]
          public string SaveImageToLocal(byte[] buffer,string name)
          {                  
  
              try
              {                
                  Bitmap bmp = new Bitmap(320, 240);
                  using (MemoryStream stream = new MemoryStream(buffer))
                  {
                      bmp = new Bitmap(stream);
                      string saveString = GetFolder() + name + ".jpg";
                      bmp.Save(saveString, System.Drawing.Imaging.ImageFormat.Jpeg);
                  }
  
                  return "Servers says : Saved..!!";
              }
              catch (Exception ex)
              {
                  return "Server says : " + ex.Message;
              }
          }
  </code></pre>
  
  <p><p>
  so when i run this application, i'm getting an exception saying <strong>"Server says : Parameter is not valid"</strong>..</p>
  
  <p>can anyone please tell me what's wrong with this code? i spent weeks to solve this problem. please help... :(  thanks...</p>