The Problem:
"Help our site has stopped working."
The Issue:
That was the email message I received last week, although the tone was more urgent and panicked. The web site hadn't stopped working but images that once showed up no longer where visible, instead the browser was showing the image not found icon or alt text. Luckily in this case I knew what part of the problem was - we had just upgraded this client's web site from an IIS5 to an IIS7 server. I just wasn't sure exactly why images were not visible on the new site.
Identify the Cause:
The first thought to come to mind was that for some unknown reason the image files were not transfered to the new computer, but this did not make sense as other images in the directory were visible on the web site. What images where not showing up and what made these images different than the others? Is soon became apparent that the images in question had been uploaded as part of a CMS and had the plus sign "+" in their name. IIS7 was doing what it should, treating file name like "image+name.gif" as "image name.gif", but IIS5 did not do so.
Easy Solution:
The fix while easy was time consuming. Writing a simple SQL statement identified 71 images with the offending symbol in their name, but it took time to find all the files on the disk and rename them.
I explained to our client what had happened and told them what characters to use for a file name.
Lesson Learned:
IIS5 allows plus signs in URL and will not treat them like spaces if a file exists that matches the URL with the plus sign - but IIS 7 is more stringent and always treats "+" as a space. Also the CMS has been modified to check incoming file names and replaces any undesirable characters with a dash "-".
Subscribe to:
Post Comments (Atom)

1 comments:
Thanks - This was what was happing to a site I manage for a client. They upgraded their web host an images disappeared. I saw them using FTP, but they where not showing up in IE.
- Brad K.
Post a Comment