Localmente - la mia MVC 4, asp.net, C# app funziona bene su IIS 8/Windows 8.Impossibile caricare il file o l'assembly 'System.Web.Mvc, Version = 3.0.0.0, problema Elmah.MVC
se distribuito a Windows Server 2008, ottengo questo errore:
Could not load file or assembly 'System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
e
[FileLoadException: Could not load file or assembly 'System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)]
Elmah.Mvc.Bootstrap.Initialize() +0
[InvalidOperationException: The pre-application start initialization method Initialize on type Elmah.Mvc.Bootstrap threw an exception with the following error message: Could not load file or assembly 'System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040).]
System.Web.Compilation.BuildManager.InvokePreStartInitMethodsCore(ICollection`1 methods, Func`1 setHostingEnvironmentCultures) +12881963
System.Web.Compilation.BuildManager.InvokePreStartInitMethods(ICollection`1 methods) +12881672
System.Web.Compilation.BuildManager.CallPreStartInitMethods(String preStartInitListPath) +240
System.Web.Compilation.BuildManager.ExecutePreAppStart() +152
System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException) +1151
[HttpException (0x80004005): The pre-application start initialization method Initialize on type Elmah.Mvc.Bootstrap threw an exception with the following error message: Could not load file or assembly 'System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040).]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +12881108
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +159
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +12722297
questo accade se si seleziona 'file Solo necessari per eseguire questa applicazione' dalle 'Articoli da distribuire' drop giù nelle proprietà del progetto/pacchetto/pubblichiamo noi b.
Se seleziono "tutti i file in questo progetto", funziona correttamente.
Immagino che Elmah sia dipendente da una versione precedente di MVC o qualcosa del genere - come posso risolvere questo problema senza dover caricare tutti i file?
Qual è il modo migliore per risolvere problemi come questo?
Grazie.
la configurazione assemblyBinding per System.Web.Mvc ha funzionato per me! – EdmundYeung99
ha funzionato anche per me :-) – Baconbeastnz
funziona come un incantesimo per errore di rinnovo, grazie! –