0

如果文件名包含# - 从 skydrive 下载失败。更准确地说 - 结果的长度始终为 0。加载其他文件没有任何问题;

谢谢

开始下载:

if (!loading) {
                if (!Storage.Exists(item.Name)
                    || MessageBox.Show(AppResources.alreadyExists, AppResources.confirmation, MessageBoxButton.OKCancel) == MessageBoxResult.OK) {
                    loading = true;
                    App.loadInfo.Name = item.Name;
                    App.loadInfo.Info = AppResources.loadingStart;
                    PhoneApplicationService.Current.UserIdleDetectionMode = IdleDetectionMode.Disa bled;
                    client.DownloadAsync(item.Id + CONTENT, item);
                }
            }

下载完成:

void client_DownloadCompleted(object sender, LiveDownloadCompletedEventArgs e) {
        PhoneApplicationService.Current.UserIdleDetectionMode = IdleDetectionMode.Enabled;
        try {
            FileItem item = e.UserState as FileItem;
            if (e.Error == null
                && !e.Cancelled
                && e.UserState != null
                && item.Size == e.Result.Length.ToString()) //LENGTH = 0 { Storage.SaveFile(item.Name, e.Result);
                App.loadInfo.Info = AppResources.loadingComplete;
                new GetIcon(item._name);
            }
            else {
                if (item != null) App.loadInfo.Name = item.Name;
                App.loadInfo.Info = AppResources.loadingError;
            }
        }
        finally { App.loadInfo.Progress = 0; loading = false; MakeUi(); }
    }

LiveDownloadProgressChangedEventArgs 没有出现

4

2 回答 2

0

如果确实如此,您能否在发出请求之前从 URI 中删除片段?

于 2012-03-28T15:48:33.430 回答
0

Live Connect 和 Live SDK 已知问题

于 2012-03-31T12:19:35.353 回答