SF5 Configuration Service Failure (404 Error) : SF5 Does not

Posted by Community Admin on 03-Aug-2018 21:05

SF5 Configuration Service Failure (404 Error) : SF5 Does not serve static images correctly

All Replies

Posted by Community Admin on 26-May-2012 00:00

Hi,

There is a post here about Sitefinity 4 not serving static images from the IIS ~/images folder:

http://www.sitefinity.com/devnet/forums/sitefinity/general-discussions/sf-4-1-does-not-server-static-images-properly-404-error.aspx 

I have been trying to do the same for Sitefinity 5 but when I go to Settings > Advanced > Libraries > Images and go to set the Url Root I get the following error:

PUT http://localhost/Sitefinity/Services/Configuration/ConfigSectionItems.svc/batch/?nodeName=Images_0,librariesConfig_0&policyHandlerName=&policyName=&mode=Form&skip=0&take=10 401 (Unauthorized) 

Does anyone know if I can set the Image Library URL through the database? Alternatively, does anyone know how I can fix this please?

Thanks! 

Posted by Community Admin on 29-May-2012 00:00

C,

Directly modifying the database isn't recommended. That said, here is some code that should help you modify the value you're trying to change:

ConfigManager manager = Config.GetManager();
LibrariesConfig section = manager.GetSection<LibrariesConfig>();
 
section.Images.UrlRoot = "sfImages";
 
manager.SaveSection(section);

Keep in mind that changing this value will not go back and modify the images you've already uploaded. Some code to fix that issue can be found on this KB article.

This thread is closed