开发者

DWS CreateFolder() files are getting created on shareppoint "Style Library"

开发者 https://www.devze.com 2022-12-17 05:43 出处:网络
I am Creating folder on Sharepoint as: Dws ds = new Dws(); ds.Credentials = new NetworkCredential(Login,Password);

I am Creating folder on Sharepoint as:

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开发者_JAVA技巧/NewFolderName");

I am getting strResult value as "RESULT" .

Here Folders are getting created but not in above specified path. It is getting created in "Style Library" of Sharepoint.

But why?


try this:

strResult = ds.CreateFolder("Documents/NewFolderName");

I have a site called "DWS" on my root site collection (note the difference in ds.Url between your code and mine):

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");
0

精彩评论

暂无评论...
验证码 换一张
取 消