CopyStream在当前上下文中不存在

时间:2018-02-20 21:12:00

标签: c# sharepoint

这是我将代码移动到sharepoint但不编译的代码,因为它说“CopyStream在当前上下文中不存在”。我已经引用了System.dll和以下命名空间:

using System.Security; 
using System.Net; 
using System.Net.Http;

...

public static void MoveFiles(string edifile, string Movetype, string editype, string csvfile)
{
    Uri destUri = new Uri("https://intranet.maxlinear.com/sales/SalesOp/Reports/B2B_POS");
    using (FileStream inStream = File.OpenRead(csvfile))
    {
        WebRequest req = WebRequest.Create(destUri);
        req.Method = "PUT";
        req.Credentials = CredentialCache.DefaultCredentials; // assuming windows Auth
        using (Stream outStream = req.GetRequestStream())                  
        {
            CopyStream(inStream, outStream);              
        }
    }
}

我错过了什么吗?任何帮助表示赞赏。

0 个答案:

没有答案