Error in facebook.dll facebooksdk

Posted by Surendar Radhakrishnan on Stack Overflow See other posts from Stack Overflow or by Surendar Radhakrishnan
Published on 2011-01-11T16:51:02Z Indexed on 2011/01/11 16:53 UTC
Read the original article Hit count: 341

I got the web application working with facebooksdk and when i deployed it...it is running fine for sometime and it is throwing the error like this...

Server Error in '/' Application.

Could not load file or assembly 'Facebook, Version=4.1.1.0, Culture=neutral, PublicKeyToken=58cb4f2111d1e6de' or one of its dependencies. Access is denied. 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.IO.FileLoadException: Could not load file or assembly 'Facebook, Version=4.1.1.0, Culture=neutral, PublicKeyToken=58cb4f2111d1e6de' or one of its dependencies. Access is denied.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Assembly Load Trace: The following information can be helpful to determine why the assembly 'Facebook, Version=4.1.1.0, Culture=neutral, PublicKeyToken=58cb4f2111d1e6de' could not be loaded.

WRN: Assembly binding logging is turned OFF. To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1. Note: There is some performance penalty associated with assembly bind failure logging. To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

Stack Trace:

[FileLoadException: Could not load file or assembly 'Facebook, Version=4.1.1.0, Culture=neutral, PublicKeyToken=58cb4f2111d1e6de' or one of its dependencies. Access is denied.] Secured_Login.FacebookVerification() +0 System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +25 System.Web.UI.Control.LoadRecursive() +71 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3048


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1


i got this method in pageload

protected void Page_Load(object sender, EventArgs e) { FacebookVerification(); }

protected void FacebookVerification() { try { FacebookApp fbApp = new FacebookApp();

        if (fbApp.Session != null)
        {
            dynamic myinfo = fbApp.Get("me");
            String firstname = myinfo.first_name;
            String lastname = myinfo.last_name;
            lblFBStatus.Text = "you signed in as " + firstname + " " + lastname ;

        }
        else
        {
            lblFBStatus.Text = "Please sign in with facebook";

        }
    }
    catch (Exception)
    {

        throw;
    }

}

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about facebook-connect