© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•3y ago•
43 replies
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;
            }
        }
        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;
            }
        }
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Value not being displayed on the page
C#CC# / help
15mo ago
User Control form not being displayed
C#CC# / help
3y ago
Image is not being skewed correctly
C#CC# / help
2y ago
❔ MVC - data is being passed to view, but not displayed
C#CC# / help
3y ago