Iis File Caching Problem

Hi, I've a question on clearing cache on IIS. I've done changes on CSS, Images, Script files,.aspx files and uploaded in client WebServer (IIS). And re-started the application by updating web.conf.

Q: ASP.NET caching problems (parser and compiler error messages). A: In case you get one of the errors below you may have a caching problem, which means that there are cached assemblies that conflicts with the assembly you are trying to build. • Parser Error Message: Could not load type 'development.Global' • Compiler Error Message: CS1595: 'System.Collections.ArrayList' is defined in multiple places; using definition from 'c: winnt microsoft.net framework v1.0.3705 mscorlib.dll' • Compiler Error Message: CS1595: 'System.Runtime.CompilerServices.CompilerGlobalScopeAttribute' is defined in multiple places; using definition from 'c: windows microsoft.net framework v1.0.3705 mscorlib.dll' To solve caching problems you need to delete all conflicting files (mainly dlls and exes) from the.Net Framework 1.0 caches. Here is how: • Shut down IIS.

• Delete all cached project files in%windir% Microsoft.NET Framework version Temporary ASP.NET Files • Delete all cached project files in C: Documents and Settings user VSWebCache • Delete all cached project files in C: Documents and Settings LocalService Local Settings Application Data assembly • Restart IIS. Here are sample command line statements that you can put in a BAT-file to do 2-4 above: del /S /F /Q 'C: Documents and Settings user EPiServer*.dll' del /S /F /Q 'C: Documents and Settings LocalService Local Settings Application Data assembly EPiServer*.dll' del /S /F /Q 'C: WINDOWS Microsoft.NET Framework v1.0.3705 Temporary ASP.NET Files *.dll'.

Macromedia Flash (.swf) files are animated images with a very small footprint. Aix toolbox for linux applications cd download These files are lightweight, and brilliant Web artists can do real magic with them. (Click for some great examples.) When I saw Flash files for the first time, I was resistant to them because I assumed that they were huge animated files that soaked up valuable bandwidth. I was working with some IIS administrators who had to solve a problem in which IIS appeared to be caching Flash images and thereby failing to render new updates when a visitor accessed the Web site.

Our reaction was, of course, 'That has to be a client-side problem.' We asked the business owners questions such as, 'Can you reproduce the problem?' And 'Does it also happen in Netscape?' I did a little research on the (MSDN).

I asked the program manager involved if she could move all the.swf files into their own folder on the Web site. She did, and we then forced IIS not to cache the.swf files on all the Web servers in the farm. Here's a little background on how IIS caches files. You use MIME to configure browsers or mail clients to view files in many different formats. IIS uses MIME mapping to map files by extension to a particular MIME type.

For example, a file with the extension.htm has a MIME type of 'text/html,' and a file with the extension.gif has a MIME type of 'image/gif.' When a browser makes a request for a particular file, IIS uses the MIME map to determine the correct MIME type; IIS then passes this information to the browser receiving the file.

IIS contains a large list of default MIME types; if IIS hasn't explicitly mapped an extension, it returns a MIME type of 'application/octet-stream.' The easiest way to disable caching for a given MIME type, such as.swf files, is to create a folder that will contain the files and then set custom headers for that folder. You can disable file caching in a Flash folder by following these steps: • Create a folder under your wwwroot folder named Flash. • Open the Internet Service Manager (ISM) in Windows 2000 or the IIS snap-in in the Microsoft Management Console (MMC). • Locate the Flash folder under your default Web site. • Right-click the Flash folder and select Properties. • Click the HTTP Headers tab.

• Click Add in the Custom HTTP Headers section. • Add a header named Cache-Control with a value of no-cache.

After this change, IIS will no longer cache any files in this folder, which is especially useful when you work with images that frequently update.

Related Post