Move Media Library To Shared Environment

Topics: Core, Troubleshooting
Jul 25, 2014 at 5:51 PM
We are deploying Orchard to an environment with a Load balancer. Because of this, we've moved the Media library to a shared server, \SharedServer\Example\Media. We tested this locally, prior to pushing the changes to our staging environment and all worked as expected.

In the staging environment, we are running into a very strange issue. We are able to upload images through the UI (we can actually see them on the server), but are not able to view the images once they've been uploaded. All images are returning a 401 Unauthorized.

Even stranger, we also have a custom uploader that is pointing to the same share and it has no issues writing or reading from this directory.

We have the share set up as a virtual directory in IIS. There is a domain level user that has full modify permissions to the Media folder. The app pool user is this same domain level user.

We are not getting much from the Orchard logs in regards to the error occurring. Here is all we see (this applies to any image pulled from the Media library):

System.ArgumentException: File Media Library\clean-garden-tools-610px-width-610x300.jpg does not exist
at Orchard.FileSystems.Media.FileSystemStorageProvider.GetFile(String path)
at Orchard.MediaProcessing.Services.ImageProfileManager.GetImage(String path) in d:\inetpub\pwccareer\Modules\Orchard.MediaProcessing\Services\ImageProfileManager.cs:line 174

We are looking for the quickest fix for this issue. I have seen mention of upgrading to version 1.8 to resolve the issue. We're currently on 1.7.

I should add that we're working with a separate server team which makes any intermediary testing cumbersome. We are really looking for a home run solution that can put this to rest. If anyone has any help it would be greatly appreciated.
Jul 26, 2014 at 4:28 PM
So the images correctly upload and you can see them on the share; also Media Library is displaying correct public URLs for the images, but when you try to open them you get 401, correct? If this is so I don't think the issue lies within Orchard but rather how the images are served from the page.