Blob Service RRS feed

  • Question

  • Hello,

    Since last week we are facing strange issue with Blob Service. We are uploading the images in the blob. While uploading image, image got black. It was working fine since long but from last week such issue arises.

    We have search on web and found that this issue is arise due to some windows update. So now we are stuck. It is our main functionality and can not move further without that.

    So please respond and provide some help on this.

    Thank you,

    Hemal Shah

    Thursday, July 2, 2015 7:24 AM

All replies

  • Hi Hemal,

    Please let us know how exactly you are uploading images to your Blob Storage, either through any storage explorer tools or Rest APIs or through any app.

    Also, as you said lets know if you have made any changes to the environment through which you where uploading previously.



    Thursday, July 2, 2015 4:51 PM
  • Hi Manu,

    We have our application from where image is generated form HTML file and saved to Blob. We are using WebBrowser control for that. Below is the code for that.


     public Stream CaptureWebPageScreen(string strhtml)

                    string tempno = DateTime.Now.TimeOfDay.TotalMilliseconds.ToString();
                    WebBrowser wb = new WebBrowser();
                    wb.AllowNavigation = true;
                    wb.ScrollBarsEnabled = false;
                    wb.Navigate(strhtml + "?" + tempno);

                    //wb.DocumentText = strhtml;
                    while (wb.ReadyState != WebBrowserReadyState.Complete);

                    wb.Width = wb.Document.Body.ScrollRectangle.Width;
                    wb.Height = wb.Document.Body.ScrollRectangle.Height;

                    Bitmap bitmap = new Bitmap(wb.Width, wb.Height);
                    wb.DrawToBitmap(bitmap, new System.Drawing.Rectangle(0, 0, wb.Width, wb.Height));
                    Graphics Grfx = Graphics.FromImage(bitmap);
                    Grfx.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.HighQualityBicubic;
                    Grfx.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality;
                    Grfx.PixelOffsetMode = System.Drawing.Drawing2D.PixelOffsetMode.HighQuality;
                    Grfx.CompositingQuality = System.Drawing.Drawing2D.CompositingQuality.HighQuality;
                    Grfx.TextContrast = 0;
                    Grfx.DrawImage(bitmap, 0, 0, wb.Width, wb.Height);
                    var imgstream = new MemoryStream();
                    bitmap.Save(imgstream, ImageFormat.Jpeg);
                    imgstream.Position = 0;
                    return imgstream;


    Above method returns the Memory stream, which we are storing to Blob. Below is the code for the same.


     public string UploadImage(Model.UploadFileInfo objfile, System.IO.Stream image, string imgcontainer = FileUploadBlobSetting.IMAGE_CONTAINER, bool IsFileshare = false)
                var blobClient = account.CreateCloudBlobClient();
                var blobRef = blobClient.GetBlockBlobReference(GetFileName(imgcontainer, objfile));

                var temindex = objfile.Path.LastIndexOf('.') + 1;
                blobRef.Properties.ContentType = "image/" + objfile.Path.Substring(temindex, objfile.Path.Length - temindex);            



    Can you please help me?

    Friday, July 3, 2015 5:59 AM