0
HttpRequest request = new HttpRequest();
request.AddHeader("Host", "api.dwebsir.com");
request.Proxy = ProxyClient.Parse(ProxyType.Http, proxy);

this way of adding custom host header doesnt seems to work.

When i ignore the the proxy and while posting without headers also seems to work.

But when i postdata with proxy and request.Header it is not taking and i am not getting any response

But when i postdata with proxy and i am receiving this

The requested URL /as/token.oauth2 was not found on this server.

i am pretty sure the error is with Host as headers i am not getting the proper fix

Bhanu Teja
  • 21
  • 6

1 Answers1

0

There is a way to do this, as Explanation given here:

http://blogs.msdn.com/feroze_daud/archive/2005/03/31/404328.aspx

next version of the framework (.NET Framework 4.0) will make it easier.

http://blogs.msdn.com/ncl/archive/2009/07/20/new-ncl-features-in-net-4-0-beta-2.aspx

Hope this helps you.

Hitesh Anshani
  • 1,499
  • 9
  • 19