2014-07-17 5 views
10

Sto tentando di caricare un sito Web semplice su Windows 2012 64 bit con Plesk installato. Uso la pubblicazione FTP con Visual Studio 2013 per caricare il sito in Directory virtuale con .NET 4.5. però io sono sempreMicrosoft.Web.Infrastructure, Versione = 1.0.0.0 Impossibile caricare su Windows 2012 64 bit, MVC5

Could not load file or assembly 'Microsoft.Web.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified. 

Sulla base di molte discussioni in StackOverflow o di ricerca, tutti sono consiglia di caricare file nella cartella bin. L'ho fatto, ho provato tre volte più

  1. Qualsiasi CPU Costruire
  2. 64bit Costruire
  3. x86Build

Ma tutto quello che sto ottenendo è errore di cui sopra. Sto usando l'hosting condiviso dal provider di hosting locale, e quindi non posso eseguire aspnet_regiis -i per garantire che .net 4.5 sia configurato correttamente o no, e la tecnologia sta discutendo per dimostrare/mostrare se .net4.5 non è installato o funziona correttamente.

Qualche idea su cosa e come dovrei riuscire a farlo funzionare?

EDIT: la mia cartella bin hanno questi file:

System.Web.Webpages.Razor.dll 
System.Web.Webpages.dll 
System.Web.Webpages.Deployment.dll 
System.Web.Razor.dll 
System.Web.Mvc.dll 
System.Web.Helpers.dll 
System.Web.Extensions.dll 
System.Web.Entity.dll 
System.Web.DynamicData.dll 
System.Web.dll 
System.Web.ApplicationServices.dll 
System.EnterpriseServices.dll 
Microsoft.Web.Infrastructure.dll 

Altro che dll del progetto

EDIT 2:

Stack Trace dall'errore:

[FileNotFoundException: Could not load file or assembly 'Microsoft.Web.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.] 
    System.Web.WebPages.PreApplicationStartCode.Start() +0 
    System.Web.Mvc.PreApplicationStartCode.Start() +32 

[InvalidOperationException: The pre-application start initialization method Start on type System.Web.Mvc.PreApplicationStartCode threw an exception with the following error message: Could not load file or assembly 'Microsoft.Web.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified..] 
    System.Web.Compilation.BuildManager.InvokePreStartInitMethodsCore(ICollection`1 methods, Func`1 setHostingEnvironmentCultures) +556 
    System.Web.Compilation.BuildManager.InvokePreStartInitMethods(ICollection`1 methods) +132 
    System.Web.Compilation.BuildManager.CallPreStartInitMethods(String preStartInitListPath, Boolean& isRefAssemblyLoaded) +102 
    System.Web.Compilation.BuildManager.ExecutePreAppStart() +153 
    System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException) +516 

[HttpException (0x80004005): The pre-application start initialization method Start on type System.Web.Mvc.PreApplicationStartCode threw an exception with the following error message: Could not load file or assembly 'Microsoft.Web.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified..] 
    System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +9885060 
    System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +101 
    System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +254 
+0

simile a http://stackoverflow.com/questions/12669206/error-microsoft-web-infrastructure-version-1-0-0-0-culture-neutral-publickeyt hai provato a installare il pacchetto come la risposta a questo suggerisce. Puoi anche scaricare la DLL e installarla manualmente nel GAC usando gacutil.exe –

+0

@GearTrooper, ho già detto che copio quei file nella mia cartella BIN, e sono ancora lì con tutti gli altri file, per Razor e MVC. –

+0

--removed comment-- –

risposta

-1

file sono lì e l'ambiente sembra pronto.

Se il pool di applicazioni è stato configurato come Net4.5 integrato, dovresti andare tutto.

Sembra che ci possa essere un problema nella configurazione.

Propongo di installare l'applicazione su un server IIS locale e di scoprire se si verifica lo stesso errore.

Ho riscontrato problemi simili a causa del fatto che l'applicazione era stata precedentemente aggiornata da una versione di MVC a un'altra che ha lasciato tracce di più versioni di riferimenti nei file di progetto e nelle configurazioni.

L'app ha funzionato bene in dev ma non sul server di produzione.

L'installazione sul server IIS locale (preferibilmente la stessa versione del provider di hosting) rende spesso più semplice risolvere il problema. Se lo fai funzionare su IIS locale sei pronto per capire come fare lo stesso sul server remoto. Spero che tu abbia un accesso remoto a IIS che rende più semplice convalidare le differenze.