Thursday, September 30, 2010

File level encryption prevented rendering of image file on IIS 7.

I was recently deploying an application to a staging environment.  The application had been tested on several development workstations and everything appeared to be fine.  This of course is the "typical" developer story and it is why staging environments are so crucial to successful deployments.  Once the application was in staging I proceeded to make a few cursory checks of the new things that would be tested by the people doing QA.  That's when I noticed that the new buttons on a page were not rendering. As it turns out, the images for the buttons were actually set for file level encryption.  Once I turned off the encryption the buttons were rendered in the view.  So if you have magically missing buttons on your web pages under IIS 7 have a look at the attributes for the file.  Another clue to the issue came when I looked at the folder containing the images files.  The two buttons that were not rendering both were listed (I use the details list quite often) in green color font which made them stand out in the list against the rest being black.

If you need to remove file level encryption all you have to do (assuming you have permissions to modify the file) is right click on the file then choose properties.  When the dialog is displayed clicked the Advance button and then un-check the option "Compress contents to save disk space".

No comments:

Post a Comment