2
Reply

Unable to run SharePoint internal Web Service "List" from Web Part

ali raza

ali raza

May 3 2010 4:08 AM
2.9k

Hi all, I am new to SharePoint development and stuck with the problem in which i need to run SSharePoint internal web service 'List'. When ever I call the GetList('MyListName') method of this web service I got following exception

Exception of type 'Microsoft.SharePoint.SoapServer.SoapServerException' was thrown.


Followin is the  Code that I am using
 
----------------------------------------------------------------

ListWS.
Lists list = new ListWS.Lists();
string strUserId = "administrator";
string strPassword = "123456";

System.Net.
NetworkCredential credential = new System.Net.NetworkCredential(strUserId, strPassword, "techerz-01");
list.Credentials = credential;

list.Timeout = System.Threading.
Timeout.Infinite;

XmlNode listResponse = list.GetList("Sites");
----------------------------------------------------------------
Any Idea how to get this issue resolve?


Answers (2)