Adding a custom header to the response

G

Guest

How can I add a custom header value to the response? I try:

Response.Headers.Add("MyHeader", "Value");
Response.AddHeader("MyHeader", "Value");
Response.AppendHeader("MyHeader", "Value");

nothing works. A lot of times I get a message about IIS integrated pipeline
mode needing to be enabled, but as far as I can tell that's only on IIS 7??

If anyone has any ideas, I'd be appreciative. I'm trying to do this in an
HttpModule. The custom header values will be consumed by a legacy
application, so I HAVE to do it this way.

Thanks,

Jeff
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,266
Messages
2,571,090
Members
48,773
Latest member
Kaybee

Latest Threads

Top