Saturday, March 28, 2009

Response.Header.Add doesn't work

I've tried to use:
Response.Header.Add("HeaderKeyName", "KeyValue")

But I got the following exception:
System.PlatformNotSupportedException: This operation requires IIS integrated pipeline mode.
at System.Web.HttpResponse.get_Headers()

The work around:
Response.AddHeader("HeaderKeyName", "KeyValue")

For the least Microsoft could find a better exception description.

No comments: