try
{
web = context.Web;
List list = context.Web.Lists.GetByTitle(listName);
CamlQuery query = new CamlQuery();
if (sprootpath == null)
{
query.FolderServerRelativeUrl = "/" + listName + "/";
}
else
{
query.FolderServerRelativeUrl = "/" + sprootpath + "/";
}
var listItems = list.GetItems(query);
context.Load(listItems);
context.ExecuteQuery();
}
catch (Exception ex)
{
Debug.Write(ex);
return false;
}
I tried
ClientContext context = ClaimClientContext.GetAuthenticatedContext(siteUrl, 800, 600);
which generated an auto pop up for login. Then after that the context object is passed to the method above.I tried
clientCtx.Credentials = new NetworkCredential("username", "password", "domain")
Checked SharePoint app pools, claim service in central admin & IIS admin services in Windows services are in running state. - Running