Results 1 to 8 of 8

Thread: [RESOLVED] [2008] DownloadString hangs grabbing html.

  1. #1

    Thread Starter
    Member Griminal's Avatar
    Join Date
    Aug 2005
    Location
    Bangor, MI
    Posts
    61

    Resolved [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:
    1. Using wc As New Net.WebClient
    2.        MessageBox.Show(wc.DownloadString("http://66.90.121.11:10013"))
    3. 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.

  2. #2
    PowerPoster stanav's Avatar
    Join Date
    Jul 2006
    Location
    Providence, RI - USA
    Posts
    9,290

    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 -

  3. #3

    Thread Starter
    Member Griminal's Avatar
    Join Date
    Aug 2005
    Location
    Bangor, MI
    Posts
    61

    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.

  4. #4
    PowerPoster 2.0 Negative0's Avatar
    Join Date
    Jun 2000
    Location
    Southeastern MI
    Posts
    4,367

    Re: [2008] DownloadString hangs grabbing html.

    Try hitting the page, instead of just the URL:

    http://66.90.121.11:10013/index.html

  5. #5

    Thread Starter
    Member Griminal's Avatar
    Join Date
    Aug 2005
    Location
    Bangor, MI
    Posts
    61

    Re: [2008] DownloadString hangs grabbing html.

    Tried that too. No dice.

  6. #6
    PowerPoster 2.0 Negative0's Avatar
    Join Date
    Jun 2000
    Location
    Southeastern MI
    Posts
    4,367

    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?

  7. #7

    Thread Starter
    Member Griminal's Avatar
    Join Date
    Aug 2005
    Location
    Bangor, MI
    Posts
    61

    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."

  8. #8

    Thread Starter
    Member Griminal's Avatar
    Join Date
    Aug 2005
    Location
    Bangor, MI
    Posts
    61

    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
  •  



Click Here to Expand Forum to Full Width