-
Strange Site
buffer1 = webClient.DownloadString("http://google.com") 'this code is not problematic just for testing
'buffer1 = webClient.DownloadString("http://api.bodis.com/domainclassification?domain=" + CurrentBlog.Domain)
For i = 1 To 10 'just to show the bug not trying to abuse or anything
buffer1 = webClient.DownloadString("http://api.bodis.com/domainclassification?domain=" + CurrentBlog.Domain) 'This code will break when i =2
Next
-
Re: Strange Site
What do you mean with "this code will break"?
-
Re: Strange Site
At i=2 I got exception. Just try it.
Code:
buffer1 = webClient.DownloadString("http://google.com") 'this code is not problematic just for testing
'buffer1 = webClient.DownloadString("http://api.bodis.com/domainclassification?domain=helloworld.com")
For i = 1 To 10 'just to show the bug not trying to abuse or anything
buffer1 = webClient.DownloadString("http://api.bodis.com/domainclassification?domain=helloworld.com") 'This code will break when i =2
Next
-
Re: Strange Site
The problem is with the server you're communicating with. I tried your code and and got a WebException telling me that the server committed a protocol violation. I tried again with Google in the loop and it worked fine. I don't know why that error occurs but it's the server, not the code, that has the issue.
-
Re: Strange Site
JM again to the rescue :) I can keep accessing the site if I use webbrowser. So why I can do that with webbrowser but not webclient is beyond me.
-
Re: Strange Site
What happens if you use a different WebClient object each time?