alexsyscomms
asked on
ASP.NET websites fail with: "The file or directory is corrupted and unreadable. (Exception from HRESULT: 0x80070570) "
Any web site that I run with ASP.NET code fails with an error that includes the above. Some times an explicit assemby is mentioned, but I have sites that just fail : Exception Details - System.BadImageFormatExcep tion: The file or directory is corrupted and unreadable.
here is the full error response from one site:
Server Error in '/' Application.
-------------------------- ---------- ---------- ---------- ---------- ---------- ----
Could not load file or assembly 'System.Web.Extensions' or one of its dependencies. The file or directory is corrupted and unreadable. (Exception from HRESULT: 0x80070570)
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.BadImageFormatExcep tion: Could not load file or assembly 'System.Web.Extensions' or one of its dependencies. The file or directory is corrupted and unreadable. (Exception from HRESULT: 0x80070570)
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Assembly Load Trace: The following information can be helpful to determine why the assembly 'System.Web.Extensions' could not be loaded.
WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\F usion!Enab leLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\F usion!Enab leLog].
Stack Trace:
[BadImageFormatException: Could not load file or assembly 'System.Web.Extensions' or one of its dependencies. The file or directory is corrupted and unreadable. (Exception from HRESULT: 0x80070570)]
[BadImageFormatException: Could not load file or assembly 'System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad3 64e35' or one of its dependencies. The file or directory is corrupted and unreadable. (Exception from HRESULT: 0x80070570)]
System.Reflection.Assembly ._nLoad(As semblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) +0
System.Reflection.Assembly .nLoad(Ass emblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) +43
System.Reflection.Assembly .InternalL oad(Assemb lyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +127
System.Reflection.Assembly .InternalL oad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +142
System.Reflection.Assembly .Load(Stri ng assemblyString) +28
System.Web.Configuration.C ompilation Section.Lo adAssembly Helper(Str ing assemblyName, Boolean starDirective) +46
[ConfigurationErrorsExcept ion: Could not load file or assembly 'System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad3 64e35' or one of its dependencies. The file or directory is corrupted and unreadable. (Exception from HRESULT: 0x80070570)]
System.Web.Configuration.C ompilation Section.Lo adAssembly Helper(Str ing assemblyName, Boolean starDirective) +613
System.Web.Configuration.C ompilation Section.Lo adAllAssem bliesFromA ppDomainBi nDirectory () +203
System.Web.Configuration.C ompilation Section.Lo adAssembly (AssemblyI nfo ai) +105
System.Web.Compilation.Bui ldManager. GetReferen cedAssembl ies(Compil ationSecti on compConfig) +178
System.Web.Compilation.Bui ldProvider sCompiler. .ctor(Virt ualPath configPath, Boolean supportLocalization, String outputAssemblyName) +54
System.Web.Compilation.Cod eDirectory Compiler.G etCodeDire ctoryAssem bly(Virtua lPath virtualDir, CodeDirectoryType dirType, String assemblyName, StringSet excludedSubdirectories, Boolean isDirectoryAllowed) +600
System.Web.Compilation.Bui ldManager. CompileCod eDirectory (VirtualPa th virtualDir, CodeDirectoryType dirType, String assemblyName, StringSet excludedSubdirectories) +125
System.Web.Compilation.Bui ldManager. CompileRes ourcesDire ctory() +31
System.Web.Compilation.Bui ldManager. EnsureTopL evelFilesC ompiled() +304
[HttpException (0x80004005): Could not load file or assembly 'System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad3 64e35' or one of its dependencies. The file or directory is corrupted and unreadable. (Exception from HRESULT: 0x80070570)]
System.Web.Compilation.Bui ldManager. ReportTopL evelCompil ationExcep tion() +58
System.Web.Compilation.Bui ldManager. EnsureTopL evelFilesC ompiled() +512
System.Web.Hosting.Hosting Environmen t.Initiali ze(Applica tionManage r appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParamete rs hostingParameters) +729
[HttpException (0x80004005): Could not load file or assembly 'System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad3 64e35' or one of its dependencies. The file or directory is corrupted and unreadable. (Exception from HRESULT: 0x80070570)]
System.Web.HttpRuntime.Fir stRequestI nit(HttpCo ntext context) +8897659
System.Web.HttpRuntime.Ens ureFirstRe questInit( HttpContex t context) +85
System.Web.HttpRuntime.Pro cessReques tNotificat ionPrivate (IIS7Worke rRequest wr, HttpContext context) +333
Note the 80004005 HTTP exceptions in the stack trace. I am running this as an administrator on the localhost with full access to files.
I think this is something to do with permissions on the .net 2 framework temp folder, but this has been cleared and everyone now has modify rights on the folder
here is the full error response from one site:
Server Error in '/' Application.
--------------------------
Could not load file or assembly 'System.Web.Extensions' or one of its dependencies. The file or directory is corrupted and unreadable. (Exception from HRESULT: 0x80070570)
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.BadImageFormatExcep
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Assembly Load Trace: The following information can be helpful to determine why the assembly 'System.Web.Extensions' could not be loaded.
WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\F
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\F
Stack Trace:
[BadImageFormatException: Could not load file or assembly 'System.Web.Extensions' or one of its dependencies. The file or directory is corrupted and unreadable. (Exception from HRESULT: 0x80070570)]
[BadImageFormatException: Could not load file or assembly 'System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad3
System.Reflection.Assembly
System.Reflection.Assembly
System.Reflection.Assembly
System.Reflection.Assembly
System.Reflection.Assembly
System.Web.Configuration.C
[ConfigurationErrorsExcept
System.Web.Configuration.C
System.Web.Configuration.C
System.Web.Configuration.C
System.Web.Compilation.Bui
System.Web.Compilation.Bui
System.Web.Compilation.Cod
System.Web.Compilation.Bui
System.Web.Compilation.Bui
System.Web.Compilation.Bui
[HttpException (0x80004005): Could not load file or assembly 'System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad3
System.Web.Compilation.Bui
System.Web.Compilation.Bui
System.Web.Hosting.Hosting
[HttpException (0x80004005): Could not load file or assembly 'System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad3
System.Web.HttpRuntime.Fir
System.Web.HttpRuntime.Ens
System.Web.HttpRuntime.Pro
Note the 80004005 HTTP exceptions in the stack trace. I am running this as an administrator on the localhost with full access to files.
I think this is something to do with permissions on the .net 2 framework temp folder, but this has been cleared and everyone now has modify rights on the folder
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.