❔ 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.
31 Replies
Things that I have tried
I tried to use this method but that just returns a loading screen
I also tried to use this method as well
For added context I did not develop this app and it was inherited from another programmer who ended with the company on bad terms so no support from the original.
What is generated
What is supposed to be there
I've not done webforms for some time, but imho you're abusing the aspx page and competing with page lifecycle issues, I'd try this as an ashx page for displaying the binary content.
Fair, I just inherited this application from a dev that left on bad terms
So no support there to explain what anything in this application is
Is there anything in commit history?
So, he did have a git repo, but when we attained the code he left the zip file without the .git folder
Also what are you using in azure
App Service
So we are working with an app no documentation sadly and no commit history
Seriously? Wtf, I'm so sorry to hear that.
Yeah it sucks
So app services are backed by an app service plan, do you know the app service plan sku/os?
I'm not sure if you can easily change oS if it's not windows
Os is windows
Ugh
SKU would be the default Basic (B1)
Yeah, I know xD
Sku won't help, but I figured on the off chance something doesn't work as expected on Linux with web forms.
Yeah
Any log messages?
I am trying this method
Nope, which is not helpful it puts the image there but its just black
So i guess it doesnt see it as an issue
Are the databases the same?
Yes they are
Hmm was thinking maybe it's just bad in prod
Which is why I am VERY confused, I was like maybe the DB just got corrupted
Btw just glancing at code, I'm concerned about rce
Remote code execution
yeah, honestly was just trying to get something working and then move on
If you had to display an image from a Byte[] in aspx how would you go about it, no code needed just a general overview
I'd use an ashx 🙂
Darnit, thats gonna be a bit weird in this case
Iirc there is a webforms image control that can take a byte source, but I'm a decade out of date on webforms
hmmm
Basically what you're doing now but with an image control
https://stackoverflow.com/questions/39338359/asp-net-display-image-from-byte-array
That gets rid of all your window location and calling out specific views in, I'm assuming JavaScript.
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.