0

I am getting the above error after turning on my SP 2013 dev VM after a long time, doing updates and restarting it. I also deleted a Checkpoint from within Hyper V because it was sucking up so much disk space. I was really stupid not merging it. Anyway, I then turned on my VM again and since then, I cannot access any sites I have created. I also cannot access my CA nor execute the SP Product Config Wizard (which fails with the same error)

Full error message:

Server Error in '/' Application.
Could not load file or assembly 'System.ServiceModel.Activation, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' 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.BadImageFormatException: Could not load file or assembly 'System.ServiceModel.Activation, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' 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.ServiceModel.Activation, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' could not be loaded.


WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (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\Fusion!EnableLog].

Stack Trace: 


[BadImageFormatException: Could not load file or assembly 'System.ServiceModel.Activation, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The file or directory is corrupted and unreadable. (Exception from HRESULT: 0x80070570)]
   System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +0
   System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +225
   System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean forIntrospection) +110
   System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +22
   System.Reflection.Assembly.Load(String assemblyString) +34
   System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +48

[ConfigurationErrorsException: Could not load file or assembly 'System.ServiceModel.Activation, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The file or directory is corrupted and unreadable. (Exception from HRESULT: 0x80070570)]
   System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +767
   System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo ai) +85
   System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) +272
   System.Web.Compilation.BuildManager.GetPreStartInitMethodsFromReferencedAssemblies() +45
   System.Web.Compilation.BuildManager.CallPreStartInitMethods(String preStartInitListPath, Boolean& isRefAssemblyLoaded) +137
   System.Web.Compilation.BuildManager.ExecutePreAppStart() +140
   System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException) +821

[HttpException (0x80004005): Could not load file or assembly 'System.ServiceModel.Activation, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The file or directory is corrupted and unreadable. (Exception from HRESULT: 0x80070570)]
   System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +518
   System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +111
   System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +719

I have tried executing aspnet_regiis -iru but it didn't do anyting. I also tried commenting out assembly references in my web.config file, but it also didn't change anything.

So is my installation screwed or does anybody have any further ideas?

0
  1. Run psconfig using PowerShell

    PSConfig.exe -cmd upgrade -inplace b2b -wait -cmd applicationcontent -install -cmd installfeatures -cmd secureresources -cmd services -install

  2. Try below 2 commands if above is not successful

    stsadm -o setproperty -pn command-line-upgrade-running -pv No

    Psconfig.exe -cmd upgrade -inplace b2b -wait -force

You might be able to open CA after this.

Further things to consider.

  1. Install latest cumulative updates

  2. Re install SharePoint if none of above resolve the issue.

  • Thanks for your reply. I have given up on trying to fix the error as it was just a dev VM. I found it made more sense to spend a day reinstalling SP than spending an unknown amount of days trying to find and fix the error. :) – LeonidasFett Oct 25 '18 at 12:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.