0

I am trying to update a SharePoint 2010 list through web service. My code can successfully update any list on the ROOT level (or site collection level). It is only when i try to update any list on variation level that the application throws error "The list that is referenced here no longer exists.". Please keep in mind i have tried setting list.url property. Manually updated app.config. Any more ideas please share. My code:

        try
        {
            System.Xml.XmlNode ndListView = list.GetListAndView("{GUID}", "");
            string strListID = ndListView.ChildNodes[0].Attributes["Name"].Value;
            string strViewID = ndListView.ChildNodes[1].Attributes["Name"].Value;
            XmlElement xmlBatchElement = xmlDoc.CreateElement("Batch");
            xmlBatchElement.SetAttribute("ListVersion", "1");
             xmlBatchElement.SetAttribute("OnError", "continue");
             xmlBatchElement.SetAttribute("ViewName", strViewID);
            xmlBatchElement.InnerXml = TheCaml; // TheCaml holds XML updates.
            try
            {
               XmlNode xmlReturn = list.UpdateListItems(strListID, xmlBatchElement);

// UpdateListItems gives error that the list does not exist anymore.

1
  • I tried list.getlistcollection() and it returns lists from the Root level only. What am i possibly doing wrong with the webservice ? Commented Mar 10, 2013 at 12:07

1 Answer 1

0

Turns out that i was using IP address for the service reference whereas i should have been using server name instead of IP address.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.