altering Request.Headers

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

It seems you cannot through an httpmodule alter request.headers. Is there a
way around this (sure.. it works fine in isapi of course). It doesn't seem to
have been changed in asp.net 2.0 either. Any workaround?
Thanks
 
Hi adamtuliper,

Welcome to MSDN newsgroup.
As for the altering the ASP.NET web request's header collection you
mentioend, I'm afraid this is not available due to the encapsulated
HttpRequest/HttpResponse object model of ASP.NET webappliction. In ASP.NET
the raw http request/response stream and headers are well encapsulated, and
most headers or other info are represented as the properties of
HttpRequest/HttpResponse class. We can view them through the MSDN reference
and only those non-readonly properties are allowed to be alter in
HttpModule or other intercepting channels. If we do need to do some low
level injecting or intercepting, I still recommend using raw ISAPI filters
instead.

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 
Back
Top