WebClient problems... Downloading a file RRS feed

  • General discussion

  • Hello.

    I am developing a simple Google Translate client for myself and I have some problems with downloading files of the internet.

    I wanted to add the unofficial TTS facility by downloading the generated mp3 file from http://translate.google.com/translate_tts?tl={0}&q={1}
    While this link works file on my Windows 7 PC with IE8 and WMP, it does not work on WP7.
    When I paste this address into IE then WMP plays the text I enter instead of {1}.
    When I use WebClient in WP7 to download this MP3 file I get the 404 Not Found error. :(
    Download Accelerators can handle it too. Internet Download Manager can download it.
    I can also download the file using VB.Net My.Computer.Network.DownloadFile function for Windows applications.

    I did some research and found out that it may be because the HTTP Referer header needs to be changed to something else.
    Unfortunately the WebClient's Header property can not be modified. An exception is given that Parameter 'Referer' can not be modified directly.

    Could I get some advice on how to change the Referer Header?
    The WP7 SDK is so limited that most of my code snippsets don't work. :/

    Saturday, March 5, 2011 5:15 PM