|
-
Feb 15th, 2009, 12:17 AM
#1
Thread Starter
Member
[RESOLVED] [2008] DownloadString hangs grabbing html.
I'm trying to parse the current song off a shoutcast stream admin page put my app just hangs at that line.
VBCODE Code:
Using wc As New Net.WebClient
MessageBox.Show(wc.DownloadString("http://66.90.121.11:10013"))
End Using
The pages loads just fine in any browser. I'm not seeing something. Can anybody help?
Last edited by Griminal; Feb 15th, 2009 at 12:20 AM.
-
Feb 15th, 2009, 09:02 AM
#2
Re: [2008] DownloadString hangs grabbing html.
The messagebox class isn't designed to display a large amount of text. Use a textbox instead. Besides, make sure the url is a working one too.
Let us have faith that right makes might, and in that faith, let us, to the end, dare to do our duty as we understand it.
- Abraham Lincoln -
-
Feb 15th, 2009, 01:21 PM
#3
Thread Starter
Member
Re: [2008] DownloadString hangs grabbing html.
Thanks for the response! I stated in my original post that the url works just fine. In regards to using the messagebox, I'm just testing and I followed jmcilhinney's example where he used the messagebox:
http://www.vbforums.com/showpost.php...96&postcount=3
I use this method all the time for other pages but I've never had this issue before. I don't know if it is in regards to the port, headers, or response time. Ignorance on my part and I searched for a few hours last night. I'm just looking for a push in the right direction.
-
Feb 15th, 2009, 01:33 PM
#4
Re: [2008] DownloadString hangs grabbing html.
Try hitting the page, instead of just the URL:
http://66.90.121.11:10013/index.html
-
Feb 15th, 2009, 01:58 PM
#5
Thread Starter
Member
Re: [2008] DownloadString hangs grabbing html.
-
Feb 15th, 2009, 03:47 PM
#6
Re: [2008] DownloadString hangs grabbing html.
When I run against that URL, I am getting an error:
"The server committed a protocol violation. Section=ResponseStatusLine"
Do you get the same error?
-
Feb 15th, 2009, 05:03 PM
#7
Thread Starter
Member
Re: [2008] DownloadString hangs grabbing html.
Yeah, I did. I did some searching and found that I needed to put httpWebRequest useUnsafeHeaderParsing = "true" into the app.config file.
Now I'm stuck with the "not doing anything hang."
-
Feb 15th, 2009, 11:40 PM
#8
Thread Starter
Member
Re: [2008] DownloadString hangs grabbing html.
Found my own solution. I did a search for webclient shoutcast and it popped right up. I always have a hard time figuring out which keywords to use in searching.
Solution: http://forums.asp.net/t/1016022.aspx
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
|