Some question about BackgroundUploader in release preview build RRS feed

  • Question

  • Hi all,

    I have some question about BackgroundUploader in release preview build

    [Question 1]
    Select CreateUpload, it will show "This content has been removed"

    But, if you search CreateUpload in VS2012 Object Browser.
    It will show "CreateUpload(Windows::Foundation::Uri^, Windows::Storage::IStorageFile^)"

    Why? Which is correct?

    [Question 2]

    String^ test = https://apis.live.net/v5.0/me/skydrive/files/Hello.txt?access_token=......;
    Uri^ url = ref new Uri(test);
    task<StorageFile^> createTempFileTask(KnownFolders::VideosLibrary->CreateFileAsync("Hello.txt",CreationCollisionOption::OpenIfExists));
    createTempFileTask.then([this, url] (task<StorageFile^> fileTask)
            StorageFile^ file = fileTask.get();
            auto uploader = ref new BackgroundUploader();
            auto uploadOperation = uploader->CreateUpload(url, file);
               .then([this](task<UploadOperation^> uploadTask)
        catch (Platform::Exception^ e)

    I want upload hello.txt to skydrive.

    Follow this code, it can work normaly on Consumer Preview Build
    But, it will show Exception message on Release Preview Build.
    Error message: "An invalid parameter was passed to a function that considers invalid parameters fata"

    Depend on this error message, it means the function parameter is incorrect
    But I can debug success

    [Question 3]

    Doesn't modify any c++ sample code,
    jsut compile and run this sample in Release Preview build
    Follow these reproduce step
    1. Select File Upload
    2. Click start upload button
    3. Select upload file

    It will show exception message "Microsoft C++ exception: Platform::COMException ^ at memory location"




    Monday, July 16, 2012 9:49 AM

All replies

  • Hi woody,

    Please post one question per post and one post per question. It is difficult to keep track of multiple questions in the same thread.

    Q1: That looks like a bad link in the MSDN page. We've filed a doc bug on this. You can find the correct link for CreateUpload on the left pane of the page.

    Q2: Where do you see the error? Are you sure your URI is correct? An invalid URI will cause CreateUpload to fail with E_INVALIDARG

    Q3: This is a first chance exception, and if you continue you will see that it is reporting that it couldn't connect to the server.


    Tuesday, July 17, 2012 1:21 AM
  • Hi Rob,

    Thanks for your reply.
    I will follow your suggestion in the next time.

    For Q2,
    I am sure the URI is correct.
    I can use the same code to upload file in consumer preview build, and it's work normaly.

    For Q3,
    So, I need change the Text about "Remote address:"?
    I can't use the initial Text "http://localhost/BackgroundTransferSample/upload.aspx"


    Tuesday, July 17, 2012 2:10 AM