How can I modify HTTP headers in ASP.NET (Web Forms) that are defined in web.config
问题 I have some custom HTTP response headers defined in an ASP.NET (Web Forms) website's web.config. I'm trying to write a managed HTTP module that can modify these web.config defined headers before they're sent back to the client. Unfortunately, whatever event I use (PreSendRequestHeaders, EndRequest) , the headers defined in web.config do not exist in the Response.Headers collection. I'm aware that PreSendRequestHeaders is not recommended so I also tried using Response.AddOnSendingHeaders but