Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# Sharepoint
I am using dws (sharepoint service for documents ) but this code is not working. it gives error :-404 . while using CreateFolder what should i use as arrgument ?
 

try
            {
                Dws ds = new Dws();
                ds.Credentials = new NetworkCredential("Admin", "admin","test-06");
                ds.Url = "http://test-06/sites/backup/_vti_bin/Dws.asmx";
                ds.PreAuthenticate = true;
                string strResult = "";
                strResult = ds.CreateFolder("Shared%20Documents/NewFolderName");
                MessageBox.Show(strResult);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message.ToString());
            }
Posted 13-Feb-13 1:45am
Comments
ryanb31 at 13-Feb-13 7:53am
   
404 means not found. I don't believe your URL is right.
richcb at 13-Feb-13 10:02am
   
Yeah, your URL looks like a folder path with http added to it.
Sandeep Mewara at 13-Feb-13 11:06am
   
Check if this path exists and is accessible. '~' at start for root folder?
like: ds.CreateFolder("~/Shared%20Documents/NewFolderName");

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



Advertise | Privacy | Mobile
Web02 | 2.8.140926.1 | Last Updated 26 Feb 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100