SF 4.1 does not server static images properly (404 error) - General Discussions - General Discussions - Progress Community
 General Discussions

SF 4.1 does not server static images properly (404 error)

  • SF 4.1 does not server static images properly (404 error)
  • 264559_404images.png
    We just tried installed SF4.1 and ran into issues displaying static images (see attached). Only images generate the 404 errors. The images are in /images folder and the project stopped working correctly under both Visual Studio and IIS7.
  • I'm having the same problem on multiple sites. Images that are served up from css and the images are under app_data folder display ok, but the simplest html like <img src="/images/test.jpg"/> gives a 404 error.

    It would also appear that SF 4.1 has broken my jquery scripts that previously worked file in 4.0, still need to investigate more as to what's going on here but it worked fine before the upgrade and broke after, the only thing I did was upgrade.

    There's gotta be a simple fix for this because if this is intended behaviour or a bug that missed testing someone needs to be fired for sure!

    I know everyone at Telerik is probably exhausted but would love a fix for this one asap!

  • Static image files work fine when served out of anything except an "images" folder in the root.  The "images" folder is used in URLs for serving Image content, so I imagine the changes under the hood with the virtual path provider are responsible for this.  Anyway, I hope there's a simple way around this.  :)
  • Hello,

    Here is the error from the ~/App_Data/Sitefinity/Logs directory.  I will try using a dir without "images".


    Timestamp: 4/18/2011 9:43:30 PM
    Message: HandlingInstanceID: 6fe0253f-e853-4f92-8e35-6a92483ff294
    An exception of type 'System.Web.HttpException' occurred and was caught.
    04/18/2011 16:43:30
    Type : System.Web.HttpException, System.Web, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
    Message : File not found.
    Source : Telerik.Sitefinity
    Help link :
    WebEventCode : 0
    ErrorCode : -2147467259
    Data : System.Collections.ListDictionaryInternal
    TargetSite : Void SendResponseAndSetCaching(System.Web.HttpRequest, System.Web.HttpResponse, Telerik.Microsoft.Practices.EnterpriseLibrary.Caching.ICacheManager, System.String)
    Stack Trace :    at Telerik.Sitefinity.Modules.Libraries.Web.LibraryHttpHandler.SendResponseAndSetCaching(HttpRequest request, HttpResponse response, ICacheManager cache, String key)
       at Telerik.Sitefinity.Modules.Libraries.Web.LibraryHttpHandler.ProcessRequest(HttpContext context)
       at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
       at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
    Additional Info:
    MachineName :
    TimeStamp : 4/18/2011 9:43:30 PM
    FullName : Telerik.Sitefinity.Utilities, Version=4.1.1339.0, Culture=neutral, PublicKeyToken=b28c218413bdf563
    AppDomainName : /LM/W3SVC/29/ROOT-3-129476334671159765
    ThreadIdentity : Anonymous
    Requested URL : /images/partners/nten.gif
    Category: ErrorLog
    Priority: 0
    EventId: 90000
    Severity: Error
    Title:Enterprise Library Exception Handling
    Machine: SV2522
    App Domain: /LM/W3SVC/29/ROOT-3-129476334671159765
    ProcessId: 12460
    Process Name: c:\windows\system32\inetsrv\w3wp.exe
    Thread Name:
    Win32 ThreadId:9768
    Extended Properties:
  • The route handler which  serves images, documents and videos from the Sitefinity libraries detects the request to the image containing /images in the path and tries to find the file in the images and documents. Since it does not find it there it throws 404.

    I would suggest that you use the approach mentioned by Michael
  • Hello,

    Using a dir such as /img/ instead of /images/ does work.

  • You've got to be kidding me!!! "images" has to be the most commonly used name for a folder to store images when building a site and you're now telling me that I can't use it anymore because you decided to hard code it into your image handler?? I have to update master pages, embedded widget templates (find and replace won't work here), user controls, css files and who knows where else across multiple sites???? Not to mention that I have to re-educate clients to tell them they can't use a folder called "images" even though they've used a folder like that since the beginning of the internet?

    Seriously this has to be a joke! I can zip up 3 sites, all templates and databases so you can do it for me if you think this is a realistic fix and you can also contact my clients to tell them why they can't use this folder.

    So common, what's the real fix here, one that actually makes sense in the world of web development.

    So far SF 4.1 is one step forward and 2 steps back for me. I have upgrade 3 sites and none of them are working yet...

  • I sadly am also on 3 attempted updates with 0 working :/. One was volatile so just blew it away and created a new project...that all worked great... ;). I'm not going to try anymore, killed too many hours tonight.
  • Hi Steve,

    “Images” is the default root mapping for images stored in Sitefinity’s Libraries module. In version 4.1 the Sitefinity’s virtual paths cannot match with physical paths for Libraries. This is necessary for performance reasons. To avoid this conflict you have to rename the physical folder or change the virtual root in Libraries configuration. To change the configurations please go to:~/Sitefinity/Administration/Settings/Advanced>Libraries>Images>UrlRoot  and change the value to something like “sf-images”.

    Sorry that we missed this from the release notes - we will make it a KB article.

    the Telerik team

  • Dear Georgi

    Is there  a way you change the default for the next SP

    ~/Sitefinity/Administration/Settings/Advanced>Libraries>Images>UrlRoot  and change the value to something like “sf-images”.

    Or will this cause to much trouble for those who have not amended before starting the project. Otherwise this 'error/problem' will carry on for generations :-)

  • 264679_sf-image-path-change.png

    I am not sure if your tip realy is the best ever.

    See image. Run into problems.

    Deleted the one and only image and uploaded again - not showing.

  • @Georgi, I agree with Markus. This fix may allow for images to be stored in images folder but it also breaks all images already stored in albums. So what's the second part of the fix? Why do you allow users to change settings that don't actually update the data? You can't actually expect someone to change a setting and then to have to start their entire site from scratch each time can you?

    Still struggling to get a single site upgraded to 4.1 so I have no idea if there are any improvements as I keep running into problems.
  • Issue is extremely critical at this point. I'd like to see a complete and tested and various configurations solution.
  • Hi,
    I changed ~/Sitefinity/Administration/Settings/Advanced>Libraries>Images>UrlRoot to "sf-images" but the images are not showing up. Am I missing something?