开发者

Error in facebook.dll facebooksdk

开发者 https://www.devze.com 2023-02-04 04:05 出处:网络
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...

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("m开发者_StackOverflow社区e");
            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;
    }
}


Have you tried the latest version of the C# Facebook SDK?

0

精彩评论

暂无评论...
验证码 换一张
取 消