2012-04-17 30 views
7

Aquí está el seguimiento de la pila:No se pudo cargar el archivo o ensamblado 'Microsoft.Web.Infrastructure' o una de sus dependencias. Acceso denegado

[FileLoadException: Could not load file or assembly 'Microsoft.Web.Infrastructure' or one of its dependencies. Access is denied.] 

System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +0 
System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +39 
System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection, Boolean suppressSecurityChecks) +132 
System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +144 
System.Reflection.Assembly.Load(String assemblyString) +28 
System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +115 

[ConfigurationErrorsException: Could not load file or assembly 'Microsoft.Web.Infrastructure' or one of its dependencies. Access is denied.] 
System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +1023 
System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() +346 
System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo ai) +85 
System.Web.Configuration.AssemblyInfo.get_AssemblyInternal() +54 
System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) +274 
System.Web.Compilation.BuildManager.GetPreStartInitMethodsFromReferencedAssemblies() +63 
System.Web.Compilation.BuildManager.CallPreStartInitMethods() +235 
System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException) +1109 

[HttpException (0x80004005): Could not load file or assembly 'Microsoft.Web.Infrastructure' or one of its dependencies. Access is denied.] 
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +762 
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +156 
System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +357 

Todo funcionaba bien. Nunca cambié nada en mis referencias. Tengo Microsoft.Web.Infrastructure.dll agregado en mi proyecto y Copy local se establece en True.

Todo estaba bien hasta que agregué una nueva Vista sin una página maestra. ¿Que esta pasando? ¿Cómo resolver esto?

Respuesta

5

Tuve el mismo problema, resultó que Visual Studio había bloqueado el .dll en cuestión. Reiniciar Visual Studio solucionó el problema, aunque todavía no tengo idea por qué sucedió.

+0

Esto solucionó el mismo problema para mí también ... – Alex

+0

Muchas gracias, después de mucho Google me encontré con esto, reinicié VS y, por supuesto, comenzó a funcionar de nuevo :) – Jen

Cuestiones relacionadas