0
Completed

System.Web.Mvc.dll could not be found

Bob Bradley 9 years ago updated by anonymous 8 years ago 6

The following exception was thrown in the browser on clicking on the link to edit the details of an existing AGENT (while scheduler was running):

System.Web.HttpCompileException (0x80004005): (0): error CS0006: Metadata file 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Web.Mvc\v4.0_3.0.0.0__31bf3856ad364e35\System.Web.Mvc.dll' could not be found
 at System.Web.Compilation.AssemblyBuilder.Compile()
 at System.Web.Compilation.BuildProvidersCompiler.PerformBuild()
 at System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath)
 at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate)
 at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate)
 at System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath virtualPath, HttpContext context, Boolean allowCrossApp, Boolean throwIfNotFound)
 at System.Web.Mvc.BuildManagerWrapper.System.Web.Mvc.IBuildManager.FileExists(String virtualPath)
 at System.Web.Mvc.VirtualPathProviderViewEngine.GetPathFromGeneralName(ControllerContext controllerContext, List`1 locations, String name, String controllerName, String areaName, String cacheKey, String[]& searchedLocations)
 at System.Web.Mvc.VirtualPathProviderViewEngine.GetPath(ControllerContext controllerContext, String[] locations, String[] areaLocations, String locationsPropertyName, String name, String controllerName, String cacheKeyPrefix, Boolean useCache, String[]& searchedLocations)
 at System.Web.Mvc.VirtualPathProviderViewEngine.FindView(ControllerContext controllerContext, String viewName, String masterName, Boolean useCache)
 at System.Web.Mvc.ViewEngineCollection.<>c__DisplayClassc.<FindView>b__b(IViewEngine e)
 at System.Web.Mvc.ViewEngineCollection.Find(Func`2 lookup, Boolean trackSearchedPaths)
 at System.Web.Mvc.ViewResult.FindView(ControllerContext context)
 at System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context)
 at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClass1c.<InvokeActionResultWithFilters>b__19()
 at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation)
 at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult)
 at System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName)

Error did not persist once I closed all browser sessions and restarted the IdB service.

Hi Bob Bradley, are you able to provide any details on reproducing the issue? The only thing I can find that sounds remotely similar is http://stackoverflow.com/questions/3698156/error-cs0006-metadata-file-c-windows-microsoft-net-framework-v2-0-50727-tempo. It says that it can happen from a recompile being triggered whilst under load. Had you recently restarted Identity Broker or updated a .config file?

Adam Bradley - the browser window had been open for a long time (days) but there were no service restarts or config file changes AFAIK. A service restart fixed the problem, so I can only presume it got into a corrupted state due to the nature of changes in the development environment (i.e. not like production where extensibility rarely changes).

Felt this was worth noting for future reference, but no time to spend now on chasing this.

Good to have this for future reference, thanks Bob Bradley