c# - Accessing list from Sharepoint Webservice with Sharepoint Online 2013 -
I am trying to access a list from the post office with sharepost.
I have made several attempts to different web reference URLs
for my web service:
example.com /sites/dms/_layouts/15/start.aspx#/Lists/Documents/AllItems.aspx
The Web service URL I'm using now is
< Code> https://example.com/sites/dms/_vti_bin/lists.asmx
Clearly, example.com is not the actual URL.
When I run the code
service.GetList ("document");
I get an error:
The list does not exist.
There is a list in the page you selected that does not exist. It may have been deleted by another user.
0x82000006
My complete code (many things are for testing purposes only):
Public Zero UpdateList () {MKLists.Lists service = GetService (); String targetsite = "https://mywebpage.com/sites/dms"; (Client contact with CTX = claimclipintext.GetAttined Context (target site)) {if (ctx! = Null) {ctx.Load (ctx.Web); // web ctx.ExecuteQuery (); // Execution String = (ctx.Web.Title); }} Cookie CollectionsAuth Cookie = ClaimClintCont.Box. Getiticated cookies (Target site, 925, 525); Service.CookieContainer = New Cookie Container (); Service.CookieContainer.Add (authCookie); XmlNode tester = service.GetList ("document"); } Private MKLists List GetService () {MKLists.Lists myService = New MKLists.Lists (); MyService.Credentials = System.Net.CredentialCache.DefaultCredentials; Return my service; }
Change this line:
MKLists List service = GetService ();
with
MKLists.Lists service = new MKLists.Lists ();
I hope this will be helpful.
Edit
According to your comment in the reply given here, attempt @ to replace Michael's target site URL
< Code> string targetsite = "https://mywebpage.com/sites/dms/_vti_bin/lists.asmx";
Hope this helps at this time
Comments
Post a Comment