sharepoint exception

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • marisenthil
    New Member
    • Jan 2009
    • 11

    sharepoint exception

    Iam try to access the sharepointlist items using asp.net code below it make exception
    Exception of type 'Microsoft.Shar ePoint.SoapServ er.SoapServerEx ception' was thrown.
    how it will be rectified?


    Code:
    try
               {
                    SharePointSvce.Lists listservice = new SharePointSvce.Lists();
                    listservice.Credentials = System.Net.CredentialCache.DefaultCredentials;
                    listservice.Url = "";
                    string listGUID = "";
    
                    string ActiveItemViewGUID = "";
    
                    System.Xml.XmlNode activeItemData = listservice.GetListItems(listGUID, ActiveItemViewGUID, null, null, "5", null, null);
                    foreach (System.Xml.XmlNode listitem in activeItemData)
                    {
                        System.Xml.XmlAttributeCollection attrs = listitem.Attributes;
                        Console.WriteLine(listitem.OuterXml);
                    }
                                    Console.ReadLine();
                }
               catch (Exception ex)
                {
                    Console.WriteLine(ex.Message);
                    Console.WriteLine(ex.StackTrace); 
                }
  • Curtis Rutland
    Recognized Expert Specialist
    • Apr 2008
    • 3264

    #2
    What is the exception's message?

    Comment

    • Frinavale
      Recognized Expert Expert
      • Oct 2006
      • 9749

      #3
      Which line are you getting the error on?
      This exception converts a SharePoint exception to a SOAP exception so that it can be deserialized on the Visual Studio .NET client...we need to know what the error message is before we can help you further.

      Comment

      • marisenthil
        New Member
        • Jan 2009
        • 11

        #4
        exception at line

        System.Xml.XmlN ode activeItemData = listservice.Get ListItems(listG UID, ActiveItemViewG UID, null, null, "5", null, null);

        Exception of type 'Microsoft.Shar ePoint.SoapServ er.SoapServerEx ception' was thrown.

        Comment

        • marisenthil
          New Member
          • Jan 2009
          • 11

          #5
          Exception at line:
          System.Xml.XmlN ode activeItemData = listservice.Get ListItems(listG UID, ActiveItemViewG UID, null, null, "5", null, null);

          Comment

          Working...