【发布时间】:2009-06-10 08:20:30
【问题描述】:
昨天我将我的网站从 c:\development\project\ 部署到 c:\inetpub\wwwroot\virtualdir\(同一台电脑)。它工作了一段时间,我可以通过http://computername/virtualdir/访问该网站。
但是今天早上大家都报错了:系统找不到指定的路径。
找不到的指定路径是什么? /virtualdir/bin/ 包含 System.Web.Mvc.Dll 程序集...而且部署项目已将其标记为依赖项,因此我在安装过程中确实包含在内,怎么会突然改变?
堆栈跟踪:
[DirectoryNotFoundException:系统找不到指定的路径。 (HRESULT 异常:0x80070003)]
[FileNotFoundException: 无法加载文件或程序集 'System.Web.Mvc, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' 或其依赖项之一。系统找不到指定的路径。]
[FileNotFoundException: 无法加载文件或程序集 'System.Web.Mvc, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' 或其依赖项之一。该系统找不到指定的路径。] System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) +0 System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) +43 System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef,证据 assemblySecurity,StackCrawlMark 和 stackMark,Boolean for Introspection)+127 System.Reflection.Assembly.InternalLoad(String assemblyString, 证据 assemblySecurity, StackCrawlMark& stackMark, Boolean for Introspection) +142 System.Reflection.Assembly.Load(String assemblyString) +28 System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +46
[ConfigurationErrorsException:无法加载文件或程序集“System.Web.Mvc,版本=1.0.0.0,Culture=neutral,PublicKeyToken=31bf3856ad364e35”或其依赖项之一。该系统找不到指定的路径。] System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +613 System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() +203 System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo ai) +105 System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) +178 System.Web.Compilation.BuildManager.GetReferencedAssemblies() +55 System.Web.Mvc.BuildManagerWrapper.System.Web.Mvc.IBuildManager.GetReferencedAssemblies() +21 System.Web.Mvc.ControllerTypeCache.GetAllControllerTypes(IBuildManager buildManager) +62 System.Web.Mvc.ControllerTypeCache.EnsureInitialized(IBuildManager buildManager) +73 System.Web.Mvc.DefaultControllerFactory.GetControllerTypeWithinNamespaces(String controllerName, HashSet`1 namespaces) +83 System.Web.Mvc.DefaultControllerFactory.GetControllerType(String controllerName) +305 System.Web.Mvc.DefaultControllerFactory.CreateController(RequestContext requestContext, String controllerName) +65 System.Web.Mvc.MvcHandler.ProcessRequest(HttpContextBase httpContext) +128 System.Web.Mvc.MvcHandler.ProcessRequest(HttpContext httpContext) +57 System.Web.Mvc.MvcHandler.System.Web.IHttpHandler.ProcessRequest(HttpContext httpContext) +7 System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +181 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75
【问题讨论】:
标签: asp.net-mvc assembly-reference-path