c# – Microsoft.Web.Infrastructure,Version = 1.0.0.0在Window
我试图在安装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构建 但我所得到的只是错误.我正在使用本地托管提供商的共享主机,因此无法运行aspnet_regiis -i以确保.net 4.5被正确配置,而tech正在争论证明/显示.net4.5是否未安装或正常工作. 任何想法我应该如何运行它? 编辑:我的bin文件夹有这些文件: 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 解决方法
文件在那里,环境声音准备好了.
如果应用程序池已配置为Net4.5集成,您应该全部去. 看来您的配置可能有问题. 我建议您将应用程序安装在本地IIS服务器上,并确定是否发生相同的错误. 由于以前已经从一个版本的MVC升级到另一个版本的应用程序,在项目文件和配置中留下了多个引用版本的痕迹,所以我有类似的问题. 应用程序在开发人员工作正常,但不在生产服务器上. 在本地IIS服务器上安装(最好与托管服务提供商相同的版本)通常可以更容易解决问题.如果您在本地IIS上运行,您可以准备好在远程服务器上执行相同操作.我希望你有远程IIS访问,这使得更容易验证差异. (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |