Hello,
I am working on an Filter Attribute for ASP.Net MVC that will return a 304 response when the content has not been modified. It would be handy to be able to read the Last-Modified header value set in the Controller in order to accomplish this... there just seems to be one problem. I can't seem to find a way to read the headers when executing code like the following on Cassini [Visual Studio 2008 Dev Web Server]...
Response.AddHeader("Last-Modified", lastModified);
string getLastModified = Response.Headers.Get("Last-Modified");
I've also tried the following:
Response.AddHeader("Last-Modified", lastModified);
string getLastModified = Response.Headers["Last-Modified"];
Both return a PlatformNotSupportedException and indicate that they require "This operation requires IIS integrated pipeline mode."
Here are some details on the environment:
- Framework Version: .Net 3.5 - SP1
- IDE: Visual Studio 2008
- Web Server: Cassini [Dev] and IIS6 [Production]
I'm probably missing a simple way to get this to work...
Thanks in advance,
Joe