How do I clear the "Referer" header?

G

Guest

Is there way to modify the "Headers" collection of the HttpRequest class?
Basically, I need to somehow clear the "Referer" header.

Any ideas will be much appreciated! Thanks!
 
J

John Timney \(Microsoft MVP\)

You could try the

myWebHeaderCollection.Remove("whatever") method.


--
Regards

John Timney
Microsoft Regional Director
Microsoft MVP
 
J

Joerg Jooss

Milan said:
Is there way to modify the "Headers" collection of the HttpRequest
class? Basically, I need to somehow clear the "Referer" header.

Any ideas will be much appreciated! Thanks!

Why would you want to do this? Your application code is the only code that
will see this property, thus being able to change it would have zero effect.

Cheers,
 
C

clintonG

You can rebuild the header but you will need to learn how to use
HTTP Modules and HTTP Handlers. What you will be doing is
using the module to intercept the request. The handler will rebuild the
header and finish resolving the request.
 

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

Forum statistics

Threads
473,767
Messages
2,569,573
Members
45,046
Latest member
Gavizuho

Latest Threads

Top