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

▼魔方 西西 提交于 2020-01-05 09:27:53

问题


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/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?


回答1:


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


来源:https://stackoverflow.com/questions/2130743/dws-createfolder-files-are-getting-created-on-shareppoint-style-library

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!