locked
Why the HttpRequest getResponse() Send two request action to the web when it was use with a proxy RRS feed

  • Question

  • When I was writing a procedure in C#, I suffer a question. That is ,in the intranet of ZheJiang University, the procedure couldn't touch the internet through the proxy server that is must to be used when one procedure want to visit internet.
    And I had tried many procedure write in C# . They all have the same question.

    So I use http debug tool to trace the reqest action and I find the  GetResponse() of the HttpWebRequest always sent two reqest. The difference between the two reqest is the first reqest'header hasn't proxy-authorization. But the problem is that the first reqest is denied by the proxy server and the second reqest couldn't work anymore.

    I also traced some procedure write in other language, they send the reqest with proxy-authorization only once and they could touch internet.

    I have tried heard to control the the action of reqest.GetResponse() but failed.

    So I want to know how to do it?

    And the end qestion is how could I touch internet through the proxy server.

    Friday, November 21, 2008 8:35 AM

Answers