Note that there are some explanatory texts on larger screens.

plurals
  1. POUploading content is only supported for 'http' and 'https' schemes
    primarykey
    data
    text
    <p>i'm trying to upload a file to an ftp server, i'm using this code :</p> <pre><code>Uri uri; if (!Uri.TryCreate(serverAddressField.Text.Trim(), UriKind.Absolute, out uri)) { rootPage.NotifyUser("Invalid URI.", NotifyType.ErrorMessage); return; } // Verify that we are currently not snapped, or that we can unsnap to open the picker. if (ApplicationView.Value == ApplicationViewState.Snapped &amp;&amp; !ApplicationView.TryUnsnap()) { rootPage.NotifyUser("File picker cannot be opened in snapped mode. Please unsnap first.", NotifyType.ErrorMessage); return; } FileOpenPicker picker = new FileOpenPicker(); picker.FileTypeFilter.Add("*"); StorageFile file = await picker.PickSingleFileAsync(); if (file == null) { rootPage.NotifyUser("No file selected.", NotifyType.ErrorMessage); return; } PasswordCredential pw = new PasswordCredential(); pw.Password = "pass"; pw.UserName = "username"; BackgroundUploader uploader = new BackgroundUploader(); uploader.ServerCredential = pw; uploader.Method = "POST"; uploader.SetRequestHeader("Filename", file.Name); UploadOperation upload = uploader.CreateUpload(uri, file); Log(String.Format("Uploading {0} to {1}, {2}", file.Name, uri.AbsoluteUri, upload.Guid)); // Attach progress and completion handlers. await HandleUploadAsync(upload, true); </code></pre> <p>but it sends me this exception here : UploadOperation upload = uploader.CreateUpload(uri, file); "An exception of type 'System.ArgumentException' occurred in Microsoft.Samples.Networking.BackgroundTransfer.exe but was not handled in user code</p> <p>WinRT information: 'uri': Uploading content is only supported for 'http' and 'https' schemes."</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload