Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/image/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 使用sharepoint 2010异步的wcf下载(获取流)文件_C#_Wcf_Sharepoint 2010 - Fatal编程技术网

C# 使用sharepoint 2010异步的wcf下载(获取流)文件

C# 使用sharepoint 2010异步的wcf下载(获取流)文件,c#,wcf,sharepoint-2010,C#,Wcf,Sharepoint 2010,您好,我想从sharepoint 2010的wcf获取文件 上下文给出的唯一方法是: context.BeginGetReadStream context.EndGetReadStream 我做了很多研究,没有任何答案 var response = context.BeginGetReadStream(MyFile, _args, (ar) => { using (System.IO.FileStream output = new F

您好,我想从sharepoint 2010的wcf获取文件

上下文给出的唯一方法是:

context.BeginGetReadStream

context.EndGetReadStream

我做了很多研究,没有任何答案

        var response = context.BeginGetReadStream(MyFile, _args, (ar) =>
        {
            using (System.IO.FileStream output = new FileStream(path, FileMode.Create))
            {
                aDS.EndGetReadStream(ar).Stream.CopyTo(output);
            }


        }, null);

这就是解决方案,它正在发挥作用

问题并没有显示您尝试了什么