Quando si tenta di accedere a una pagina (default.aspx) in un sito Web in IIS 7.0 (sviluppato utilizzando VSTS 2010 + .Net 4.0 su Windows Server 2008), ho riscontrato il seguente errore Messaggio. Qualche idea, cosa c'è che non va? Cosa significa BadImageFormatException?BadImageFormatException durante il problema di carico dell'assieme .Net
BTW: eseguo Windows Server 2008 a 64 bit (non R2) e non è ancora stato attivato Windows Server 2008, potrebbe essere una causa principale?
[BadImageFormatException: Could not load file or assembly 'test.foo' or one of its dependencies. Try to load bad formatted program. ] System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +0 System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection, Boolean suppressSecurityChecks) +567 System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +192 System.Reflection.Assembly.Load(String assemblyString) +35 System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +118 [ConfigurationErrorsException: Could not load file or assembly 'test.foo' or one of its dependencies. Try to load bad formatted program. ] System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +11392147 System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() +484 System.Web.Configuration.AssemblyInfo.get_AssemblyInternal() +127 System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) +334 System.Web.Compilation.BuildManager.CallPreStartInitMethods() +280 System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException) +1087 [HttpException (0x80004005): Could not load file or assembly 'test.foo' or one of its dependencies. Try to load bad formatted program. ] System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +11524352 System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +141 System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +4782309
Penso che il nome dell'assembly manchi ".dll". Si prega di fornire lo snippet di codice. –
Mancata corrispondenza 64-bit/32 bit? Hai compilato i tuoi assembly per una piattaforma specifica? – Alex
"Penso che il nome dell'assembly manchi" .dll ". Fornisci lo snippet di codice." - Dalla traccia dello stack, penso che tutta la traccia dello stack del codice non sia nel mio codice, sembra proprio il codice? Che cosa devo fornire e quale frammento di codice hai bisogno per analizzare questo problema? – George2