This operation requires IIS integrated pipeline mode - PlatformNotSupportedException

While experimenting with setting up of Cache-Control headers on Response object, i ran into following exception when I tries to access Headers property of Response object directly.


Exception type: PlatformNotSupportedException 
Exception message: This operation requires IIS integrated pipeline mode.

If i had read the documentation for Headers property I would have not done it at the first place. Here is what documentation says. The Headers property is only supported with the IIS 7.0 integrated pipeline mode and at least the .NET Framework 3.0. So if you are setting an headers in the response on IIS6 or earlier, use AddHeader method of Response object.

comments powered by Disqus

Blog Tags