Error with WebFormsSearchDemo

Jun 18, 2014 at 1:05 PM
Im using the WebFormsSearchDemo project. When I try doing a search it errors out with the following details:

JsonData instance doesn't hold an int
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.InvalidOperationException: JsonData instance doesn't hold an int

Source Error:

Line 27: select search;
Line 28:
Line 29: var searched = searchResults.First();
Line 30:
Line 31: SearchResultListView.DataSource = searched.Statuses;

Source File: c:\Users\Phill\Copy\Development\WebFormsDemos_2.1.07\WebFormsDemos\WebFormsSearchDemo\Results.aspx.cs Line: 29

Stack Trace:

[InvalidOperationException: JsonData instance doesn't hold an int]
LinqToTwitter.TwitterQueryProvider.Execute(Expression expression) +763
System.Linq.Queryable.First(IQueryable`1 source) +251
WebFormsSearchDemo._Default.btnSubmit_Click(Object sender, EventArgs e) in c:\Users\Phill\Copy\Development\WebFormsDemos_2.1.07\WebFormsDemos\WebFormsSearchDemo\Results.aspx.cs:29
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +9615682
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +103
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +35
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1724

Any ideas why?
Jun 19, 2014 at 8:29 AM

This website is about Tweetinvi (which you are not using)!
But I would encourage you to use it, here is the code to perform a search:
// Search the tweets containing tweetinvi
var tweets = Search.SearchTweets("tweetinvi");

// Complex search
var searchParameter = Search.GenerateSearchTweetParameter("tweetinvi");
searchParameter.SetGeoCode(-122.398720, 37.781157, 1, DistanceMeasure.Miles);
searchParameter.Lang = Language.English;
searchParameter.SearchType = SearchResultType.Popular;
searchParameter.MaximumNumberOfResults = 100;
searchParameter.Until = new DateTime(2013, 12, 1);
searchParameter.SinceId = 399616835892781056;
searchParameter.MaxId = 405001488843284480;
var tweets = Search.SearchTweets(searchParameter);
Marked as answer by linvi on 6/30/2014 at 12:04 PM
Jun 19, 2014 at 9:51 AM
Edited Jun 19, 2014 at 9:51 AM

Apologies, I have been playing with various libraries / options including TweetInvi.

Evidently I forgot which one I was using and posted here by mistake.