Powered by MSDN

US - English
NEW! Silverlight 5 is available Learn More

WebClient Download Failure For Certain URL RSS

16 replies

Last post May 05, 2008 09:57 PM by brown950

(0)
  • brown950

    brown950

    Member

    20 Points

    14 Posts

    WebClient Download Failure For Certain URL

    May 03, 2008 09:44 AM | LINK

    I'm trying to use the WebClient to retrieve data from a page but it never works, always resulting in the error message: Download Failure.  I do have the necessary cross-domain XML files in place and I have tested using the WebClient to retrieve other files from this site with no problem.  I've been doing a lot of testing and the problem seems to be the URL, but I'm not sure how to fix that.

    An example of the URL in question is: http://localhost:8080/html.ng/network=fim&size=movepre&property=foo&pagetype=bar&params.styles=html_vod&special=hlutest

    However, if the URL were something like: http://localhost:8080/testdata.txt, it loads fine.

    I tested this out using Apache and some rewrite rules to rewrite anything looking like the first URL or something like /foo to a static text file.  Both URLs work fine in my browser, but the first ALWAYS fails in Silverlight 2 while the second always works.

    However, I did create a WinForms application and it works fine using the first URL.  So I'm not sure if this is an issue with the Silverlight WebClient or Uri class.

    Any suggestions?

     

    webclient downloadfailure download failure crossdomain uri

  • swildermuth

    swildermuth

    Star

    8438 Points

    1547 Posts

    Re: WebClient Download Failure For Certain URL

    May 03, 2008 09:50 PM | LINK

    No good suggestion, my guess is that since you're URI doesn't have traditional query string syntax that the URI class is choking on the syntax.  That seems like a bug in Silverlight, not necessarily something for you to fix on the server.

    Shawn Wildermuth
    MVP, Speaker and Author

    Web Workshop (HTML5/CSS/MVC4)
    San Fran, CA - Mar 28-30, 2012
    Dallas, TX: Apr 29-May 1, 2012
    https://agilitrain.com/Workshop/Info/Web_Workshop
  • swildermuth

    swildermuth

    Star

    8438 Points

    1547 Posts

    Re: WebClient Download Failure For Certain URL

    May 03, 2008 09:50 PM | LINK

    No good suggestion, my guess is that since you're URI doesn't have traditional query string syntax that the URI class is choking on the syntax.  That seems like a bug in Silverlight, not necessarily something for you to fix on the server.

     
    Shawn Wildermuth
    MVP, Speaker and Author

    Web Workshop (HTML5/CSS/MVC4)
    San Fran, CA - Mar 28-30, 2012
    Dallas, TX: Apr 29-May 1, 2012
    https://agilitrain.com/Workshop/Info/Web_Workshop
  • swildermuth

    swildermuth

    Star

    8438 Points

    1547 Posts

    Re: WebClient Download Failure For Certain URL

    May 03, 2008 09:50 PM | LINK

    No good suggestion, my guess is that since you're URI doesn't have traditional query string syntax that the URI class is choking on the syntax.  That seems like a bug in Silverlight, not necessarily something for you to fix on the server.

     You
    Shawn Wildermuth
    MVP, Speaker and Author

    Web Workshop (HTML5/CSS/MVC4)
    San Fran, CA - Mar 28-30, 2012
    Dallas, TX: Apr 29-May 1, 2012
    https://agilitrain.com/Workshop/Info/Web_Workshop
  • swildermuth

    swildermuth

    Star

    8438 Points

    1547 Posts

    Re: WebClient Download Failure For Certain URL

    May 03, 2008 09:50 PM | LINK

    No good suggestion, my guess is that since you're URI doesn't have traditional query string syntax that the URI class is choking on the syntax.  That seems like a bug in Silverlight, not necessarily something for you to fix on the server.

     You might
    Shawn Wildermuth
    MVP, Speaker and Author

    Web Workshop (HTML5/CSS/MVC4)
    San Fran, CA - Mar 28-30, 2012
    Dallas, TX: Apr 29-May 1, 2012
    https://agilitrain.com/Workshop/Info/Web_Workshop
  • swildermuth

    swildermuth

    Star

    8438 Points

    1547 Posts

    Re: WebClient Download Failure For Certain URL

    May 03, 2008 09:50 PM | LINK

    No good suggestion, my guess is that since you're URI doesn't have traditional query string syntax that the URI class is choking on the syntax.  That seems like a bug in Silverlight, not necessarily something for you to fix on the server.

     You might get
    Shawn Wildermuth
    MVP, Speaker and Author

    Web Workshop (HTML5/CSS/MVC4)
    San Fran, CA - Mar 28-30, 2012
    Dallas, TX: Apr 29-May 1, 2012
    https://agilitrain.com/Workshop/Info/Web_Workshop
  • swildermuth

    swildermuth

    Star

    8438 Points

    1547 Posts

    Re: WebClient Download Failure For Certain URL

    May 03, 2008 09:50 PM | LINK

    No good suggestion, my guess is that since you're URI doesn't have traditional query string syntax that the URI class is choking on the syntax.  That seems like a bug in Silverlight, not necessarily something for you to fix on the server.

     You might get away with
    Shawn Wildermuth
    MVP, Speaker and Author

    Web Workshop (HTML5/CSS/MVC4)
    San Fran, CA - Mar 28-30, 2012
    Dallas, TX: Apr 29-May 1, 2012
    https://agilitrain.com/Workshop/Info/Web_Workshop
  • swildermuth

    swildermuth

    Star

    8438 Points

    1547 Posts

    Re: WebClient Download Failure For Certain URL

    May 03, 2008 09:50 PM | LINK

    No good suggestion, my guess is that since you're URI doesn't have traditional query string syntax that the URI class is choking on the syntax.  That seems like a bug in Silverlight, not necessarily something for you to fix on the server.

     You might get away
    Shawn Wildermuth
    MVP, Speaker and Author

    Web Workshop (HTML5/CSS/MVC4)
    San Fran, CA - Mar 28-30, 2012
    Dallas, TX: Apr 29-May 1, 2012
    https://agilitrain.com/Workshop/Info/Web_Workshop
  • swildermuth

    swildermuth

    Star

    8438 Points

    1547 Posts

    Re: WebClient Download Failure For Certain URL

    May 03, 2008 09:50 PM | LINK

    No good suggestion, my guess is that since you're URI doesn't have traditional query string syntax that the URI class is choking on the syntax.  That seems like a bug in Silverlight, not necessarily something for you to fix on the server.

     You might get away with it if you
    Shawn Wildermuth
    MVP, Speaker and Author

    Web Workshop (HTML5/CSS/MVC4)
    San Fran, CA - Mar 28-30, 2012
    Dallas, TX: Apr 29-May 1, 2012
    https://agilitrain.com/Workshop/Info/Web_Workshop
  • swildermuth

    swildermuth

    Star

    8438 Points

    1547 Posts

    Re: WebClient Download Failure For Certain URL

    May 03, 2008 09:52 PM | LINK

    Sorry for the mulitple posts...the AJAX driven reply window is freaking out (and submitted the form as I typed).

     One thing you can try is to URL encode it using HtmlUtility.UrlEncode().

    Shawn Wildermuth
    MVP, Speaker and Author

    Web Workshop (HTML5/CSS/MVC4)
    San Fran, CA - Mar 28-30, 2012
    Dallas, TX: Apr 29-May 1, 2012
    https://agilitrain.com/Workshop/Info/Web_Workshop