title: Save image from result convert base64 string in asp.net core
body: <p>Before i already make method in webservice and it is my coding</p>
  
  <pre><code>[WebMethod]
  [ScriptMethod(ResponseFormat = ResponseFormat.Json)]
  public void Base64ToImage(string imagestr)
  {
      DbAccessConnection conn = getActiveConnection();
  
      try
      {
          beginTransaction(conn);
  
          string DefaultImagePath = HttpContext.Current.Server.MapPath("~/c:/image");
  
          byte[] bytes = Convert.FromBase64String(imagestr);
  
          using (MemoryStream ms = new MemoryStream(bytes))
          {
              Image pic = Image.FromStream(ms);
  
              pic.Save(DefaultImagePath);
          }
              commitTransaction(conn);
      }
      catch (Exception ex)
      {
          rollbackTransaction(conn);
  
          Responder.writeResponse(false, ex.Message);             
      }
  }
  </code></pre>
  
  <p>And i got message error when i execute method Base64ToImage in my webservice 
  This is a message error</p>
  
  <pre><code>{"isSuccess":false,"resultMessage":"A generic error occurred in GDI+.","data":null}
  </code></pre>
  
  <p>Please help me, how i can fix ?</p>