|
-
Apr 27th, 2004, 03:36 AM
#1
Thread Starter
Fanatic Member
Webproxy problem.
Hi.
I have asked this once before, and I did get some replies, but unfortunatly none that worked.
How to use webproxy and webrequest?
I just get a timeout exception.
I have also tried to set the proxy manual. Then I don't get the timeout, but "an unexpected error occured during recive".
I found this sample on MSDN
VB Code:
Dim sURL As String
sURL = "http://www.microsoft.com"
Dim wrGETURL As WebRequest
wrGETURL = WebRequest.Create(sURL)
wrGETURL.Proxy = WebProxy.GetDefaultProxy()
Dim objStream As Stream
objStream = wrGETURL.GetResponse.GetResponseStream()
Dim objReader As New StreamReader(objStream)
Dim sLine As String = ""
Dim i As Integer = 0
Do While Not sLine Is Nothing
i += 1
sLine = objReader.ReadLine
If Not sLine Is Nothing Then
Console.WriteLine("{0}:{1}", i, sLine)
End If
Loop
Console.ReadLine()
I figured, "hey, ms made it, so it must work...". Well, it didn't. At least not for me.
Here's some screenshots of my proxy settings in IE.
Can anyone help me with this?
I wish I could think of something witty to put in my sig...
...Currently using VS2013...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|