+1-888-365-2779
Try Now
More in this section

Forums / General Discussions / SF5 Configuration Service Failure (404 Error) : SF5 Does not serve static images correctly

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

2 posts, 0 answered
  1. C
    C avatar
    1 posts
    Registered:
    25 Oct 2011
    26 May 2012
    Link to this post
    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! 
  2. Tim
    Tim avatar
    258 posts
    Registered:
    22 Jun 2011
    29 May 2012
    Link to this post
    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.
2 posts, 0 answered