Add Header To Request (not the response!)

C

Chad A. Beckner

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
 
J

John Timney \( MVP \)

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/issues/02/08/HTTPFilters/

This might get you started, but its not a solution.
http://msdn.microsoft.com/library/d...html/c6313e80-7780-408f-a3c0-639794b42842.asp

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

--
Regards

John Timney
ASP.NET MVP
Microsoft Regional Director
 

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,997
Messages
2,570,240
Members
46,828
Latest member
LauraCastr

Latest Threads

Top