altering Request.Headers

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
 
S

Steven Cheng[MSFT]

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.)
 

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

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top