I'ts really, really strange.
I did run you app: all ok.
Then I did run my app: now all ok!
I really cannot explain this....
you can improve the sample moving the twitter data downloading block
_twitterCtx = New TwitterContext(_auth)
Dim search =
(From srch In _twitterCtx.Search
Where srch.Type = SearchType.Search AndAlso
srch.Query = "LINQ to Twitter") _
TwitterListView.DataSource = search.Statuses
inside the block
If _auth.IsAuthorized Then
' omitted: code to access and save credentials from _auth.Credentials.AccessToken and _auth.Credentials.OAuthToken
' that I found always nothing
and, of course, my comments here was related to my problem so you can remove.
Or, better, move the binding code inside Page.Databinding event handler and call me.DataBind after If _auth.IsAuthorized Then
2 - In fact I'm using in memory state, but I think this cannot be the cause of the problem because I make a lot of test, and my app pools don't recycle so often. In fact, I did try also from VS debugger, that doesn't recycle at all. However, using that kind
of code, where is the problem? The SessionStateCredentials instance is created in every page execution, so if the app is recycled I think that it will not be a problem. In fact, I think also I can use InMemoryCredentials, assigning consumerKey and secret every
time I instantate the object, and this will works. Or I've not understood how the library works?
Thanks a lot for you assistance!