I ran into an issue where cetain images served from a virtual directory, mapped to Network Attached Storage (NAS) via a UNC path would not display. After quite a bit of detective work I noticed that the images failing to display where those of about 600KB in size. If I resized the images under 200KB they dispalyed fine. I found some information on MSDN that states that IIS caches the remote files for faster delivery. Periodically, IIS poles the remote locations (UNC Paths) for file changes. I believe the following registry entry to be the cause:
Registry Path: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\InetInfo\Parameters |
Data Type: REG_DWORD |
Default Value: 256 KB (262,144 bytes) |
Controls the maximum size of cache files. The default is 256 KB if no value is present. |