title: Why do my ETag headers work under IIS but not under the VS2010 web server?
body: <p>In my ASP.NET MVC 2 app, I have the following lines:</p>
  
  <pre><code>Response.Cache.SetMaxAge(TimeSpan.FromDays(90));
  Response.Cache.SetETag(lastWriteTime.Value.Ticks.ToString());
  </code></pre>
  
  <p>Using Fiddler to trace the HTTP streams, I can see:</p>
  
  <pre><code>ETag: 634473035667000000
  </code></pre>
  
  <p>in the Response Headers when running under IIS7, but when I'm running under the Visual Studio 2010 web server, this header just... disappears. Whether I set it via Response.Cache.SetETag() or via Response.AppendHeader("ETag", etag), it just never gets returned.</p>
  
  <p>Is this a "feature" of the IIS web server? Is there some config setting I've missed? It's going to make testing cache invalidation a bit fiddly if I have to attach to the IIS process to be able to debug anything... </p>
  
  <p>EDIT: It also appears that despite calling Response.Cache.SetCacheability(HttpCacheability.Public), VS/Cassini always returns resources with HTTP Cache-Control set to "private"... does that help?</p>