Tags

, , , , , , ,

One of our techs had a funny one the other day – a power outage and surge went straight through a client’s UPS, and rebooted the ESXi box running a virtualised instance of SBS 2011.  This corrupted the Exchange Database, which refused to mount on reboot.  Easiest solution was a restore to the previous night’s backup, which went fine, and all was working normally apart from OWA and any phones relying on access to it.

N.B. previous IT had installed Exchange and logs to default C: drive

Possible error messages include:

“Could not load file or assembly ‘2013-03-12 21-00 Copy of Microsoft.Exchange.Clients.Owa’ or one of its dependencies. The located assembly’s manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)”

and

Server Error in '/owa' Application.

Could not load file or assembly '2014-10-24 23-00 Copy of Microsoft.Exchange.Clients.Owa' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

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.IO.FileLoadException: Could not load file or assembly '2014-10-24 23-00 Copy of Microsoft.Exchange.Clients.Owa' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

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 '2014-10-24 23-00 Copy of Microsoft.Exchange.Clients.Owa' 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: 


[FileLoadException: Could not load file or assembly '2014-10-24 23-00 Copy of Microsoft.Exchange.Clients.Owa' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)]
   System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) +0
   System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +416
   System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +166
   System.Reflection.Assembly.Load(String assemblyString) +35
   System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +190

[ConfigurationErrorsException: Could not load file or assembly '2014-10-24 23-00 Copy of Microsoft.Exchange.Clients.Owa' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)]
   System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +11326376
   System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() +388
   System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo ai) +232
   System.Web.Configuration.AssemblyInfo.get_AssemblyInternal() +48
   System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) +210
   System.Web.Compilation.BuildProvidersCompiler..ctor(VirtualPath configPath, Boolean supportLocalization, String outputAssemblyName) +76
   System.Web.Compilation.ApplicationBuildProvider.GetGlobalAsaxBuildResult(Boolean isPrecompiledApp) +283
   System.Web.Compilation.BuildManager.CompileGlobalAsax() +50
   System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() +676

[HttpException (0x80004005): Could not load file or assembly '2014-10-24 23-00 Copy of Microsoft.Exchange.Clients.Owa' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)]
   System.Web.Compilation.BuildManager.ReportTopLevelCompilationException() +76
   System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() +1012
   System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters) +1025

[HttpException (0x80004005): Could not load file or assembly '2014-10-24 23-00 Copy of Microsoft.Exchange.Clients.Owa' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)]
   System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +11420374
   System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +88
   System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +4405156

Version Information: Microsoft .NET Framework Version:2.0.50727.5485; ASP.NET Version:2.0.50727.5483

The fix was bizarre, and found via two Expert’s Exchange answers which was a lifesaver, as the cause is not something you would expect, but obviously something a few people have now experienced when restoring in the same situation (we are guessing the restore process created copies of these files somehow).

Browse to the following folder:

c:\program files\microsoft\exchange server\v14\ClientAccess\owa

and also look in any of the these subfolders of Exchange

C:\Program Files\Exchange Server\V14\ClientAccess\Autodiscover\bin
C:\Program Files\Exchange Server\V14\ClientAccess\ecp\bin
C:\Program Files\Exchange Server\V14\ExchangeOAB\a986a330-9e79-4eef-bb89-11ab58573e49
C:\Program Files\Exchange Server\V14\ClientAccess\exchweb\ews\bin
C:\Program Files\Exchange Server\V14\ClientAccess\Owa\Bin
C:\Program Files\Exchange Server\V14\RemoteScripts
C:\Program Files\Exchange Server\V14\Scripts
C:\Program Files\Exchange Server\V14\ClientAccess\Sync\Bin
C:\Program Files\Exchange Server\V14\ClientAccess\Sync\Xsd
C:\Program Files\Exchange Server\V14\Bin

 

FIX:

If you find any “copy of…” duplicate files in these folders, simply delete

Somehow these copy files are created during the restore, and Exchange simply tries to load whatever libraries happen to be in those folders, and if it detects a mismatch, errors out.

Credit to EE answers available with paid subscription here:
http://www.experts-exchange.com/OS/Microsoft_Operating_Systems/Server/SBS_Small_Business_Server/Q_28546360.html
and here:
http://www.experts-exchange.com/OS/Microsoft_Operating_Systems/Server/Windows_Server_2008/Q_28066092.html

 

Advertisements