ASP.NET MVC and IE caching – manipulating response headers ineffective

I think you should just use HttpContext.Current.Response.Cache.SetMaxAge (new TimeSpan (0)); or HttpContext.Current.Response.Headers.Set (“Cache-Control”, “private, max-age=0”); to set max-age=0 which means nothing more as the cache re-validating (see here). If you would be set additionally ETag in the header with some your custom checksum of hash from the data, the ETag from the previous request will … Read more

How to prevent an ASP.NET application restarting when the web.config is modified?

Actually, the first two answers are incorrect. It is possible, and quite easy, to prevent this recycling from happening, and this feature has been available since at least IIS6. Method 1 (system wide) Change the DWORD registry setting for HKLM\SOFTWARE\Wow6432Node\Microsoft\ASP.NET\FCNMode to the value 1, which will disable all file change notifications. Don’t be confused by … Read more

IIS7 Cache-Control

If you want to set the Cache-Control header, there’s nothing in the IIS7 UI to do this, sadly. You can however drop this web.config in the root of the folder or site where you want to set it: <?xml version=”1.0″ encoding=”UTF-8″?> <configuration> <system.webServer> <staticContent> <clientCache cacheControlMode=”UseMaxAge” cacheControlMaxAge=”7.00:00:00″ /> </staticContent> </system.webServer> </configuration> That will inform the … Read more

Error – Unable to access the IIS metabase

On Windows 8 Pro: %systemroot%\inetsrv\config On Windows 7 and 8.1 and 10 %systemroot%\System32\inetsrv\config (Where %systemroot% is usually C:\Windows) Navigate to the appropriate location above in Windows Explorer. You will be blocked access with a popup which says: “You don’t have access to this folder – Click continue to permanently get access to this folder” Click … Read more