All Umbraco media resources are inaccessible due to 500 error
Basically, every image I upload with the Umbraco media picker uploads successfully, and I even check the media folder and all media is indeed there and not corrupted in any way, but they are inaccessible.
Every attempt to access media is greeted with a 500 internal server error, I tried using direct links to the image without query strings, even attempting to access resources that were manually uploaded to a folder in the root of the website and all still yield the 500 error.
This wasn't always like this, the problem is I have no idea what is causing the issue, I tried clearing the cache and deleting some files in the app_data folder, and also deleted any plugins that could cause issues.
Has anyone ever encountered this before?
EDIT:
For some reason the content-type header for the media is text/html instead of image files. That might be the problem but I'm still trying to tackle this.
Another EDIT:
I have partially solved the problem by restoring files I deleted in the app_data folder, I though deleting some folders there were for clearing the cache but I must've deleted the wrong folders.
When I say i have partially solved the issue, I mean that on the front end the website does load images but on the back office I still get 500 errors on media resources with the text/html content-type response header.
You can safely delete the contents of the TEMP folder in App_Data. You may need to stop the web-server to delete all of this. It's advisable to do so.
What is the actual 500 error you are getting? If put the URL of an image into your browser what do you get? Check your log files if you have friendly errors on. Do you remember what the last change you made before this happened?
I notice you are attempting to access images on HTTPS, could this be an issue? Can you access the same resources over HTTP? Have you set umbracoUseSSL in appSettings within your web.config?
Can you try setting debug="true" in web.config, as this bypasses the client dependency caching.
But images with querystrings still returns 500 internal errors.
Also now I have another problem, when I enter the backoffice > developer > models builder, I get a 404 when it tries to access ami-dev/App_Plugins/ModelsBuilder/modelsbuilder.htm
(ami-dev is the website root url)
Anyways, currently is seems like every problem i fix generates 20 more problems..
interceptAllRequests="false" should be the default for Image processor.
Is this an upgraded site? Was it installed via NuGet? I'd check you have gotten the configuration correct. What I would do is go to the Umbraco Releases page and download the version you have installed. Then I'd use a diff tool to diff your config files (web.config , /config/*) with the ones in your install and ensure you haven't missed anything.
Alright, that's what I'll do. I'll keep this thread posted.
Do you think upgrading the Umbraco could help or would it make it worse? I'm currently working on version 7.4.4.
All Umbraco media resources are inaccessible due to 500 error
Basically, every image I upload with the Umbraco media picker uploads successfully, and I even check the media folder and all media is indeed there and not corrupted in any way, but they are inaccessible.
Every attempt to access media is greeted with a 500 internal server error, I tried using direct links to the image without query strings, even attempting to access resources that were manually uploaded to a folder in the root of the website and all still yield the 500 error.
This wasn't always like this, the problem is I have no idea what is causing the issue, I tried clearing the cache and deleting some files in the app_data folder, and also deleted any plugins that could cause issues.
Has anyone ever encountered this before?
EDIT:
For some reason the content-type header for the media is text/html instead of image files. That might be the problem but I'm still trying to tackle this.
Another EDIT:
I have partially solved the problem by restoring files I deleted in the app_data folder, I though deleting some folders there were for clearing the cache but I must've deleted the wrong folders.
When I say i have partially solved the issue, I mean that on the front end the website does load images but on the back office I still get 500 errors on media resources with the text/html content-type response header.
You can safely delete the contents of the TEMP folder in App_Data. You may need to stop the web-server to delete all of this. It's advisable to do so.
What is the actual 500 error you are getting? If put the URL of an image into your browser what do you get? Check your log files if you have friendly errors on. Do you remember what the last change you made before this happened?
I notice you are attempting to access images on HTTPS, could this be an issue? Can you access the same resources over HTTP? Have you set
umbracoUseSSL
inappSettings
within yourweb.config
?Can you try setting
debug="true"
in web.config, as this bypasses the client dependency caching.Hey, its not related to https and debug is set to true.
I partially solved the problem by editing the config/imageprocessor/processing.config
Before:
After:
But images with querystrings still returns 500 internal errors. Also now I have another problem, when I enter the backoffice > developer > models builder, I get a 404 when it tries to access ami-dev/App_Plugins/ModelsBuilder/modelsbuilder.htm (ami-dev is the website root url)
Anyways, currently is seems like every problem i fix generates 20 more problems..
interceptAllRequests="false"
should be the default for Image processor.Is this an upgraded site? Was it installed via NuGet? I'd check you have gotten the configuration correct. What I would do is go to the Umbraco Releases page and download the version you have installed. Then I'd use a diff tool to diff your config files (
web.config
,/config/*
) with the ones in your install and ensure you haven't missed anything.Alright, that's what I'll do. I'll keep this thread posted. Do you think upgrading the Umbraco could help or would it make it worse? I'm currently working on version 7.4.4.
I'd probably check the config files first. If they check out OK then an upgrade could help (just make a back up). Hope you get it fixed!
is working on a reply...