471,627 Members | 1,571 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,627 software developers and data experts.

Add Header To Request (not the response!)

Hi,

I am trying to figure out how to add a header to an incoming request in
ASP.NET. This is needed because I need to set some header information which
ASP (non-DOTNET) uses to process requests. I have looked at the httpmodule
and httphandler, but can't figure out how to do it (always says it's a
read-only collection). Any ideas? I already have a working ISAPI filter,
but am trying to get away from that setup.

Thanks!

Chad
Dec 10 '05 #1
1 1837
If I recall correctly, IIS passes on the complete request stream to ASP.NET.
By the time an iHttpHandler has access to it it is already part of the
request object as a read only collection of data. Thus, you can only modify
the headers collection at request creation from a windows app for example as
you are creating the request, not recieving it.

You may need to drop down to an ISAPI filter to work with the stream to the
level you are looking for.
http://msdn.microsoft.com/msdnmag/is...8/HTTPFilters/

This might get you started, but its not a solution.
http://msdn.microsoft.com/library/de...9794b42842.asp

There are ISAPI modules you can buy to do this avaialable.

--
Regards

John Timney
ASP.NET MVP
Microsoft Regional Director

"Chad A. Beckner" <cb******@iupui.edu> wrote in message
news:e1*************@TK2MSFTNGP14.phx.gbl...
Hi,

I am trying to figure out how to add a header to an incoming request in
ASP.NET. This is needed because I need to set some header information
which ASP (non-DOTNET) uses to process requests. I have looked at the
httpmodule and httphandler, but can't figure out how to do it (always says
it's a read-only collection). Any ideas? I already have a working ISAPI
filter, but am trying to get away from that setup.

Thanks!

Chad

Dec 10 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Paulam Chang via DotNetMonster.com | last post: by
2 posts views Thread by Reena | last post: by
2 posts views Thread by Vaibhav | last post: by
1 post views Thread by Chad A. Beckner | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.