I have the following error
An exception of type 'Microsoft.SharePoint.Client.ServerException' occurred in Microsoft.SharePoint.Client.Runtime.dll but was not handled in user code
Additional information: Value does not fall within the expected range.
ar profile = GetProfileForGuid(item.Tag.ProfileGuid);
var clientContext = SPCredentialManager.GetSPContext(profile, item.Tag.WebUrl);
// ClientContext clientContext = new ClientContext();
// clientContext.AuthenticationMode = ClientAuthenticationMode.FormsAuthentication;
// clientContext.FormsAuthenticationLoginInfo = new FormsAuthenticationLoginInfo("kcs\ras", "Shahram123!");
List oList = clientContext.Web.Lists.GetByTitle(item.Header);
CamlQuery query = CamlQuery.CreateAllItemsQuery();
//CamlQuery camlQuery = new CamlQuery();
// camlQuery.ViewXml = "<View><RowLimit>100</RowLimit></View>";
ListItemCollection collListItem = oList.GetItems(query);
clientContext.Load(collListItem);
clientContext.ExecuteQuery();