“too many automatic redirections were attempted” error message when using a httpWebRequest in .NET

后端 未结 4 1574
不思量自难忘°
不思量自难忘° 2021-01-01 14:52

I am attempting to request a page like \"http://www.google.com/?q=random\" using the webrequest class in vb.net. we are behind a firewall, so we have to authenticate our req

4条回答
  •  北荒
    北荒 (楼主)
    2021-01-01 15:31

    I translated the C# that Darryl provided to VB and inserted it before the getResponse call.

    Dim cookieContainer As CookieContainer = New CookieContainer()
    loHttp.CookieContainer = cookieContainer
    loWebResponse = loHttp.GetResponse()
    

提交回复
热议问题