Hello,
I want to be able to do a http request to an url at a certain IP-address and with a certain host header.
Seems like HttpWebRequest doesn't support this. When I write:
HttpWebRequest request = (HttpWebRequest)WebRequest.Create("http://127.0.0.1/");
request.Headers.Add("Host", "http://www.foo.com/");
...
I get the message: "The 'Host' header cannot be modified directly."
Is there any other way to do this?
Erik JuhlinPosted Feb 5, 2008, 8:58 AM
Got help evenutally on another forum that pointed med to the use Proxy. :)
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1815870&SiteID=1