Changing Request Headers values

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

Guest

How do I change a value in the request headers?

I need the value Request.Headers.Item("Host") to be changed from localhost
to a domain name, any thoughts?

I know it should be easy to do because ASP.net makes everything easy, but I
can't seem to figure it.

Thanks

I have already tried:
* Creating a IHttpHandler
* Adding a property to global.asax called Request that was not read-only
* Creating a new class that inherits from HttpRequest but the class is
marked as NonInheritable
 
It seems a very dodgy thing to want to do, so I'm not surprised it's not
working.

If you can explain why you think you need to do this, maybe someone will
come up with a better solution.
 
Back
Top