Uploading files to media gives "internal server error"
My development platform is on Windows 10 and I'm using VS2013.
The site works fine and is working on the operational platform. Until now on the development platform, I've been using IIS Express - no problems.. But now I've changed to the Local IIS and the media files have the following problems:
1 If I run the site there are no errors but the images do not display. The URL is localhost/MySite/MyPage/ and the src for the image is /images/1234/image.jpg. I think it's concatenating the URL to localhost/MySite/MyPage/images/1234/image.jpg. If I try localhost/MySite/images/1234/image.jpg the image displays.
2 In the back office, if I go to the Media section and select any previously uploaded image, I get the red cross and the image doesn't display. If I try to upload another image I get "internal server error".
Hmm that sounds really odd - Have you checked the /App_Data/Logs file to see if any related information is revealed there? Anything marked with "ERROR" ?
I'm wondering if it could somehow be either a mime type issue, however that would surprise me a bit, or whether it might be a permission issue for some reason - Could you try giving the everyone role full access to the umbraco folder and see if that solves it? If so you need to modify your permissions accordingly of course :)
My AppData folder is empty. Because of another problem I had uninstalled log4net. I've now reinstalled it but still no logging. Am I missing a line in a config file somewhere?
Did you put Umbraco in a virtual directory (i.e., your site exists at localhost/MySite/ rather than localhost/)? That could mess with the media paths.
By the way, I doubt it would be concatenating the images to the first part of the path. If the src starts with "/", it will start at the root of the site.
If I'm reading that correctly, you may well have setup the Umbraco site as a virtual directory. I'm not sure that is well supported (especially in older versions). Do you need to do that, or did you just happen to do that? FYI, this is what I see when I look at my local IIS sites:
The video was very helpful but setting up the host file didn't work; just went of to the internet rather than to the local IIS. Fixed it by changing the port from 80.
The way Visual Studio had set up the local IIS was to make the site a child of the Default website in IIS; hence my different Advanced settings snip in my last post. This configuration caused the problem with the Media files.
Uploading files to media gives "internal server error"
My development platform is on Windows 10 and I'm using VS2013.
The site works fine and is working on the operational platform. Until now on the development platform, I've been using IIS Express - no problems.. But now I've changed to the Local IIS and the media files have the following problems:
1 If I run the site there are no errors but the images do not display. The URL is localhost/MySite/MyPage/ and the src for the image is /images/1234/image.jpg. I think it's concatenating the URL to localhost/MySite/MyPage/images/1234/image.jpg. If I try localhost/MySite/images/1234/image.jpg the image displays.
2 In the back office, if I go to the Media section and select any previously uploaded image, I get the red cross and the image doesn't display. If I try to upload another image I get "internal server error".
What have I done wrong?
Your help would be much appreciated.
Thanking you in anticipation.
Roger
Hi Roger
Hmm that sounds really odd - Have you checked the /App_Data/Logs file to see if any related information is revealed there? Anything marked with "ERROR" ?
I'm wondering if it could somehow be either a mime type issue, however that would surprise me a bit, or whether it might be a permission issue for some reason - Could you try giving the everyone role full access to the umbraco folder and see if that solves it? If so you need to modify your permissions accordingly of course :)
Looking forward to hearing from you.
/Jan
Thanks, Jan.
My AppData folder is empty. Because of another problem I had uninstalled log4net. I've now reinstalled it but still no logging. Am I missing a line in a config file somewhere?
Did you put Umbraco in a virtual directory (i.e., your site exists at
localhost/MySite/
rather thanlocalhost/
)? That could mess with the media paths.By the way, I doubt it would be concatenating the images to the first part of the path. If the src starts with "/", it will start at the root of the site.
Also, which Umbraco version are you using?
I'm using 7.28
I used VS to set up the LocalIIS but the attached snip seems to show that the virtual path is correct?
If I'm reading that correctly, you may well have setup the Umbraco site as a virtual directory. I'm not sure that is well supported (especially in older versions). Do you need to do that, or did you just happen to do that? FYI, this is what I see when I look at my local IIS sites:
Here's a video I created a while ago that shows how to set up Umbraco sites in IIS: https://www.youtube.com/watch?v=iK8YM3JBgwM
Thanks for this, Nicholas.
The video was very helpful but setting up the host file didn't work; just went of to the internet rather than to the local IIS. Fixed it by changing the port from 80.
The way Visual Studio had set up the local IIS was to make the site a child of the Default website in IIS; hence my different Advanced settings snip in my last post. This configuration caused the problem with the Media files.
Thanks again.
Roger
is working on a reply...