Click here to Skip to main content
15,886,689 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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 ?


C#
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
Comments
ZurdoDev 13-Feb-13 7:53am    
404 means not found. I don't believe your URL is right.
Richard C Bishop 13-Feb-13 10:02am    
Yeah, your URL looks like a folder path with http added to it.
Sandeep Mewara 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)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900