Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
8
Reply
Retriving list items using dotnet csom In sharepoint
Cibun Swain
Jul 7 2014 4:47 AM
1.5k
Reply
Hi ,,
Currently i am running with a issue that is..i want to retrieve sharepoint list items by using dotnet csom..but it throwing 404 unautherized error.
after giving system account credential also throwing same error..please anybosy help me out where i am going wrong
Below is my code
// ClientContext context = new ClientContext(HttpContext.Current.Request.Url);
using (ClientContext context = new ClientContext("http://najbsys2:16786/Holidays"))
{
context.Credentials = new NetworkCredential("naspadmin01", "Hello#!@#", "DC"); //naspadmin01(system account/Application pool admin)
List getitems = context.Web.Lists.GetByTitle("Expenses");
CamlQuery query = CamlQuery.CreateAllItemsQuery(100);Expenses
ListItemCollection items = getitems.GetByQuerry(querry);
context.Load(items);
context.ExecuteQuery();
foreach (var item in items)
{
lblUrl.Text = item[""EmpNumber].ToString();
lblUrl.Text += Environment.NewLine;
}
}
please any body has any solution provide me
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
8
)
Next Recommended Forum
sharepoint Interfaces with SAP/LOB
REST API in SharePoint 2010 for listdata.svc get errors