Simple web request
This should be simple, I say someone do it before... from a vb.net app request from a weather service web site, the current temperature and read that (xml) and display it in the text box....
Don't know if I have any of my code correct, that is why I didn't post it.. I get an error also saying that
"The remote server returned an error: (407) Proxy Authentication Required."
Can someone help me....
If you dont know that you have any code correct and you arent showing us any code - how are we really meant to tell you why its not working. You obviously have some specific web service you are trying to communicate with - provide us with the details and show us a the code snippet. It cant be that much code.
Then we will be able to assist more - dont be shy, we are here to help you.
The first code works just fine....
The second code for the weather breaks on the following lines
Dim y As Integer = strHtml.IndexOf(")<br/>")
strOut = strHtml.Substring(x, y - x + 6)
the <br/> is not found and y is then -1 which the results in the second call failing as the substring arguments are not.
You may want to add some additional code to allow better reporting of exceptions for debugging purposes.
Your original problem looks like its to do with the security on your network as the code appears to get the XML without a problem here.