C#C
C#3y ago
tropic

❔ Image is not being displayed On Azure

In an application we get images of pdf files from the database in the form of a byte[]. When you use the preview button it is to open a new tab and display that file. IN development it shows up fine but once it is deployed to Azure on app service, Its just a blank page with no URL or any thing. I am requesting help debugging it.
        protected void cppreview_Callback(object sender, CallbackEventArgsBase e)
        {
            using (var uow = new OriginationUow())
            {
                var id = new Guid(Convert.ToString(hdf_attchmentid.Get("attachmentid")));
                var file = uow.Attachments.GetAll().Where(o => o.InvoiceId == (id));

                foreach (var item in file)
                {
                    byte[] fileBytes = item.FileDetails;
                    var filename = item.DocName;

                    if (filename.EndsWith(".pdf"))
                    {

                        Session["PdfFile"] = fileBytes;
                        Session["PdfId"] = id;
                        _name = "View/Attachment/PdfFile.aspx";
                    }
                }

                cppreview.JSProperties["cpResult"] = _name;
            }
        }
Was this page helpful?