Note: This bug has been resolved with Orchard 1.6

If your Orchard site is running as an Azure Web Role, chances are that your Media is stored in Blob Storage. This presents a few challenges because these files are stored at some Windows Azure generated domain instead of your main site’s domain. One such challenge is with the built in MediaPickerField control.

Add a MediaPickerField to one of your content types. Now create some new content – inserting an image from the Media gallery with the MediaPickerField control. The url of the image should resemble something like This is the canonical url to where our image lives in Azure Blob storage.

Attempt to click the Publish Now button. Did your selected image save with your content? Probably not. If you happen to inspect the error logs (which for Azure are stored in Azure Table storage – instructions here), what you’ll probably find is an error like the following:

Orchard.ContentManagement.Drivers.Coordinators.ContentFieldDriverCoordinator - 
ArgumentException thrown from IContentFieldDriver by Orchard.Fields.Drivers.MediaPickerFieldDriver

System.ArgumentException: The relative virtual path 
'https:/…/image.jpg’ is not allowed here.

The issue is that before Orchard 1.6, the MediaPickerFieldDriver performed this check:

if (!String.IsNullOrWhiteSpace(field.Url) && !_webSiteFolder.FileExists(field.Url))
   updater.AddModelError("Url", T("The media in {0} could not be found", 

Deep within Orchard, this .FileExists() check assumes that the provided Url is a relative path. By attempting to insert a canonical path, an error is thrown and Orchard doesn’t allow the MediaPickerField value to be saved.

The fix is simple. Remove this entire if block. If you examine the Orchard 1.6 source code, you will see that the same change has been made there.