With IIS7, it gets MUCH easier. What you're looking for is "Shared configuration". You can set that at the global level on the server. With that, you can have hot-hot, or hot-warm like you described.
On the primary server, use "export" under shared configuration. That will save the server's Machine Key (different than ASP.NET's machineKey). That ensures that all encrypted data can be ready on the new server. It will also save applicationHost.config and administration.config. Once you do an import on the 2nd server, applicationHost.config and administration.config can (and should) be 100% the same between both servers.
So, you can use DFS-R to keep the configs 100% in sync automatically, or use something like robocopy to do it at regular intervals, depending on your favorite tool.
You don't need to point to a different path on your primary server either. Just use the export for the sake of the 2nd server.
The Web Deployment Tool is great, but for what you're talking about, Shared Configuration is a better fit.
It should be noted that certificates aren't stored in those files so you need to do them manually when you set them up, or use something else (like Web Deployment Tool) for keeping those in sync.
Another thing you can consider for an inexpensive but powerful load balancer is Microsoft's new ARR technology. (Application Request Routing)
According to section 14.9 of the HTTP1.1 spec, the no-cache
directive for the Cache-Control header is only imposable by the origin server, which means IIS is ignoring the header in your request.
The cache-control directives can be
broken down into these general
categories:
- Restrictions on what are cacheable; these may only be imposed
by
the origin server.
Section 14.9.1 defines public
, private
, and no-cache
as the directives restricting what is cacheable, which can only be imposed by the server.
If you don't want your .js file to be cached you'll either need to set the no-cache
directive in the app (ie- the ASP.NET code) or you'll need to change the Cache-Control
header in the request to use the no-store
directive instead of no-cache
.
EDIT:
Based on your comment - yes I assumed you did not want the file cached. The 304, then, might be coming as a result of the file being in one of IIS's internal caches. Have a look at these:
Best Answer
I would really like to see
system.webServer/caching
section from your applicationhost.config and web.config. Please paste them if you can. By running the above appcmd command, you have just disabled User mode caching you still have Kernel caching enabled. Also, if you really want to disable caching at the Web site or server level, just change the following:You can also use Fiddler tools to verify if the content is really cached i.e. if it's returning you 304.