Take the 2-minute tour ×

I'm using Facebook C# SDK to interact with my funpage, I wrote an ASP NET vb page that posts photo on the fun page wall, it works fine on my local machine, but I receive this error when I try to execute the page on my website:

Attempt by method 'DynamicClass.CallSite.Target(System.Runtime.CompilerServices.Closure, System.Runtime.CompilerServices.CallSite, System.Object)' to access type 'System.Runtime.CompilerServices.CallSite`1' failed.

It happens when I try to cicle the array with my page access tocken.(me/accounts)

the code below generates this error after _step = 3 :

    Dim app As New FacebookClient(access_token)
    _step = 1
    Dim accts As Object = app.Get("/me/accounts")
    _step = 2
    ' find the access token for the fan page
    Dim page_access_token As String
    _step = 3

    For Each acct As Object In accts.data
        _step = 4

        If acct.id = Session("page_id").ToString() Then
            _step = 5
            page_access_token = acct.access_token
            '  get_album(page_access_token);
            _step = 6
            Dim fb As New FacebookClient(page_access_token)
            _step = 7
            Session.Add("page_access_token", page_access_token)
            Exit For
        End If

I read on the web that my hosting services has server trust level set to Medium. hope that someone can help me to solve this.

share|improve this question
add comment


Your Answer



Browse other questions tagged or ask your own question.