.NET Generic Handlers and a Pain in the Neck
I’m using Microsoft Virtual Earth to map locations for a project that I’m working on. This is all fine and good. I’m using a GeoRSS feed to populate points on my map with code like this:
The issue here, is that my ashx handler that was providing the GeoRSS feed was somehow being cached. So updates to data would NOT be reflected on the GeoRSS feed until I closed and opened the browser window. This was not good.
Enter Response Headers:
I’m saved right? Not a chance. Using the above syntax will result in an exception to the effect of “Requires IIS integrated pipeline mode” Turns out that this is an IIS 7.0 ONLY feature; this is not supported on IIS 6, what I’m using since there is no IIS 7.0 for Windows Server 2003.
A quick swap from
and you’re all set.
I’m still kinda peeved that .Net does not account for the operating system (and thus IIS version) and adjust the call accordingly. I thought one of the reasons for .Net was to write ONE VERSION of your application and deploy to ANY operating system, and provided you did not use any [DllImports] your application was supposed to work. Overall, still very happy with .Net but kinda peeved about this one.
Entry filed under: Uncategorized.