I am trying to change the value of "Host" parameters in the HttpWebRequest headers but I am getting error below:
"This header must be modified with the appropriate property. at System.Net.WebHeaderCollection.ThrowOnRestrictedHeader(String headerName)"
I am trying to use the following code:
HttpWebRequest hbWebRequest = (HttpWebRequest)System.Net.HttpWebRequest.Create(WebService);
hbWebRequest.Method = "POST";
hbWebRequest.Headers["Host"] = WebURL;