2012-04-09 3 views
0

Я пытаюсь использовать сборки Facebook в ASP.NET MVC 3. Я после этого учебника: http://csharpsdk.org/docs/web/getting-started , но когда я пытаюсь использовать один из его функции как этот ...Не удалось загрузить тип «Facebook.FacebookApplication» из сборки

[FacebookAuthorize(LoginUrl = "...")] 
    public abstract class SuperController<T> : Controller where T : BaseRequirement 
{ 
... 
} 

Когда другие контроллеры наследуют его, я получаю исключение. Исключение:

Could not load type 'Facebook.FacebookApplication' from assembly 'Facebook, Version=6.0.10.0, Culture=neutral, PublicKeyToken=58cb4f2111d1e6de'. 

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.TypeLoadException: Could not load type 'Facebook.FacebookApplication' from assembly 'Facebook, Version=6.0.10.0, Culture=neutral, PublicKeyToken=58cb4f2111d1e6de'. 

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. 

Stack Trace: 


[TypeLoadException: Could not load type 'Facebook.FacebookApplication' from assembly 'Facebook, Version=6.0.10.0, Culture=neutral, PublicKeyToken=58cb4f2111d1e6de'.] 
    Facebook.Web.Mvc.FacebookAuthorizeAttributeBase.OnAuthorization(AuthorizationContext filterContext) in e:\Prabir\Documents\Projects\facebooksdk\v5.3.2\Source\Facebook.Web.Mvc\FacebookAuthorizeAttributeBase.cs:44 
    System.Web.Mvc.ControllerActionInvoker.InvokeAuthorizationFilters(ControllerContext controllerContext, IList`1 filters, ActionDescriptor actionDescriptor) +102 
    System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName) +343 
    System.Web.Mvc.Controller.ExecuteCore() +116 
    System.Web.Mvc.ControllerBase.Execute(RequestContext requestContext) +97 
    System.Web.Mvc.ControllerBase.System.Web.Mvc.IController.Execute(RequestContext requestContext) +10 
    System.Web.Mvc.<>c__DisplayClassb.<BeginProcessRequest>b__5() +37 
    System.Web.Mvc.Async.<>c__DisplayClass1.<MakeVoidDelegate>b__0() +21 
    System.Web.Mvc.Async.<>c__DisplayClass8`1.<BeginSynchronous>b__7(IAsyncResult _) +12 
    System.Web.Mvc.Async.WrappedAsyncResult`1.End() +62 
    System.Web.Mvc.<>c__DisplayClasse.<EndProcessRequest>b__d() +50 
    System.Web.Mvc.SecurityUtil.<GetCallInAppTrustThunk>b__0(Action f) +7 
    System.Web.Mvc.SecurityUtil.ProcessInApplicationTrust(Action action) +22 
    System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +60 
    System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result) +9 
    System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +8969201 
    System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +184 

Я пытался обновить из NuGet и проверить, если я использую последнюю версию, и я думаю, что это нормально. В моем app.config я нашел это:

<runtime> 
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> 
     <dependentAssembly> 
     <assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" /> 
     <bindingRedirect oldVersion="1.0.0.0-2.0.0.0" newVersion="3.0.0.0" /> 
     </dependentAssembly> 
     <dependentAssembly> 
     <assemblyIdentity name="Facebook" publicKeyToken="58cb4f2111d1e6de" culture="neutral" /> 
     <bindingRedirect oldVersion="0.0.0.0-6.0.10.0" newVersion="6.0.10.0" /> 
     </dependentAssembly> 
    </assemblyBinding> 
    </runtime> 

Спасибо заранее,

ответ

Смежные вопросы