TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Cibun Swain
NA
257
50.5k
Retriving list items using dotnet csom In sharepoint
Jul 7 2014 4:47 AM
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
Reply
Answers (
8
)
sharepoint Interfaces with SAP/LOB
REST API in SharePoint 2010 for listdata.svc get errors