我在Sharepoint上创建文件夹为:
Dws ds = new Dws();
ds.Credentials = new NetworkCredential(Login,Password);
ds.Url = "http://myservername/_vti_bin/DWS.asmx";
ds.PreAuthenticate = true;
string strResult = "";
strResult = ds.CreateFolder("SiteName/Documents/NewFolderName");
我的strResult
值为"RESULT"
。
此处文件夹已创建,但未在上面指定的路径中创建。 它正在Sharepoint的“风格库”中创建。
但为什么?
答案 0 :(得分:0)
试试这个:
strResult = ds.CreateFolder("Documents/NewFolderName");
我的根网站集上有一个名为“DWS”的网站(请注意代码和我之间ds.Url的区别):
Dws ds = new Dws();
ds.Credentials = new NetworkCredential(Login,Password);
ds.Url = "http://myservername/DWS/_vti_bin/DWS.asmx";
ds.PreAuthenticate = true;
string strResult = "";
strResult = ds.CreateFolder("Documents/NewFolderName");