BackgroundTransferService is unable to handle redirection while uploading in windows phone 8 RRS feed

  • Question

  • I am working on a Windows Phone 8 Silverlight application. I use BackgroundTransferService to upload files to a server. I have two scenarios here:

    Normal Scenario:
    I do a POST request to a URL, the file gets uploaded and as a response I get the metadata of the file.

    Redirection Scenario:
    I do a POST request to a URL, I get a redirection URL and I have to do a POST request to this redirected URL and then get the metadata of the file as a reponse.

    In my case Redirection Scenario is not being handled by the BackgroundTransferService class. I get TransferStatus.Completed with Http Status code 0.

    Is there any way to handle redirection URLs while uploading or am I missing something obvious?
    Tuesday, March 10, 2015 1:49 PM

All replies

  • Do a pre-upload request before making the background transfer to ensure the resultant URL is accessible.
    I'm trying to understand why you would be trying to post to a location that has moved. 

    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    Tuesday, March 10, 2015 7:34 PM