我试图在安装Plesk的
Windows 2012 64位操作系统上上传一个简单的网站.我使用FTP发布与Visual Studio 2013上传站点在虚拟目录与.NET 4.5.不过我得到了
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.
基于StackOverflow或Search中的大量线程,建议您将文件上传到bin文件夹中.我这样做,我尝试三次
>任何cpu构建
> 64bit Build
> x86Build
但我所得到的只是错误.我正在使用本地托管提供商的共享主机,因此无法运行aspnet_regiis -i以确保.net 4.5被正确配置,而tech正在争论证明/显示.net4.5是否未安装或正常工作.
任何想法我应该如何运行它?
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
除了项目的dll
编辑2:
堆栈跟踪从错误:
[FileNotFoundException: Could not load file or assembly 'Microsoft.Web.Infrastructure,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,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,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