A web Application uses SharePoint client object model to interact with sharepoint and get the list values. We found that approximately 50% time, it gets value from SharePoint 2010 SP 2. List has image path and image is stored in web application path.
We don't have privilege to login to web application production server to test the following code to test the connectivity.
I there any other we can figure of the root cause of the issue.
When I do testing locally it works and problem occur only in production. Can somebody help me to find root cause.
Microsoft.SharePoint.Client.ListItemCollection listItems = null;
using (ClientContext clientContext = new ClientContext(String.Concat(SharePointUrl, serverRelativeUrl + sitePath)))
clientContext.Credentials = new NetworkCredential(sharePointUserName, sharePointPasswd, sharePointDomain);
Web site = clientContext.Web;
list = site.Lists.GetByTitle(listTitle);
CamlQuery camlQuery = new CamlQuery();
camlQuery.ViewXml = "<View/>";
listItems = list.GetItems(camlQuery);
Count.Text = listItems != null ? listItems.Count.ToString() : "0";