Dear fellow detectives, let me share you some information after my own Sherlock Holmes session with Windows Live Mail 2012 on Windows 7 yesterday.
At first I tried the repair/reinstall thing multiple times, it didn't work.
Then I thought, if I'm lucky the programmers might have built in some logging into the application, and it will leave some information traces in the eventlog or something, so I looked in eventvwr.exe, but alas, no information.
So I looked further for diagnostics, and there it was! Options -> Advanced tab -> Maintenance button, on the bottom there is a section "Trouble shooting". Lo and behold, you can check the "E-mail" checkbox. So now I try to reply to an e-mail again, same error message ofcourse. Then I opened the log file, which has thousands of lines of every little thing it does, and amongst that there I saw this section:
[23:57:44.18] 1e58 Mail: Zone_MailChk ERROR: (contenteditorfactorymanager.cpp:76), failed with 0x80131018
[23:57:44.18] 1e58 Mail: Zone_MailChk ERROR: (contenteditorfactorymanager.cpp:191), failed with 0x80131018
[23:57:44.18] 1e58 Mail: Zone_MailChk ERROR: (contenteditorfactorymanager.cpp:237), failed with 0x80131018
[23:57:44.18] 1e58 Mail: Zone_MailChk ERROR: (composehost.cpp:643), failed with 0x80131018
[23:57:44.18] 1e58 Mail: Zone_MailChk ERROR: (mehost.cpp:3840), failed with 0x80040104
[23:57:44.18] 1e58 Mail: Zone_MailChk ERROR: (note.cpp:3088), failed with 0x80131018
This looked very suspicious, looks like it can't fire up the "contenteditor", which I assume is the message edit window. This seemed like a good hint to finding the root cause and so I decide to dig deeper with this information.
Googling for error 0x80131018 didn't give me a very clear idea of the problem, but I did see some posts about failing to load .NET assemblies and NGEN. I had a hunch a failure to load a .NET assembly might actually be it. I vaguely remembered that it's possible to monitor the loading of .NET assemblies, including any failures of doing so. The tool is Fuslogvw.exe, so I fired it up, and chose some path to log into and pick some detailed level of logging. And voila, bingo!
*** Assembly Binder Log Entry (17-11-2015 @ 0:22:43) ***
The operation failed.
Bind result: hr = 0x80131018. No description available.
Assembly manager loaded from: C:\Windows\Microsoft.NET\Framework\v2.0.50727\mscorwks.dll
Running under executable C:\Program Files (x86)\Windows Live\Mail\wlmail.exe
--- A detailed error log follows.
=== Pre-bind state information ===
LOG: User = PC-51873942\Wout
LOG: DisplayName = System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
(Fully-specified)
LOG: Appbase = file:///C:/Program Files (x86)/Windows Live/Mail/
LOG: Initial PrivatePath = NULL
LOG: Dynamic Base = NULL
LOG: Cache Base = NULL
LOG: AppName = NULL
Calling assembly : WindowsLive.Writer.PostEditor, Version=16.4.3528.331, Culture=neutral, PublicKeyToken=31bf3856ad364e35.
===
LOG: This bind starts in LoadFrom load context.
WRN: Native image will not be probed in LoadFrom context. Native image will only be probed in default load context, like with Assembly.Load().
LOG: No application configuration file found.
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v2.0.50727\config\machine.config.
LOG: Post-policy reference: System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
WRN: Found match in cache, but cannot create assembly from the cache information.
ERR: Unrecoverable error occurred during pre-download check (hr = 0x80131018).
It failed to load the .NET 2.0 assembly System.dll when firing up the message editor. I figured the .NET assembly was ngen-ed (precompiled), and that the ngen native image was potentially broken. I didn't really manage to repair the ngen native image unfortunately, and I didn't have much faith in fixing this one assembly to solve everything (I already tried scanning and chkdsk for errors and that didn't help either, which should repair .NET corruptions, although they did find/recover some errors. I also tried the NetFxRepairTool with no results). So in my case I decided to reinstall my Windows, because I figured there might be a whole lot corrupted (while gaming my system black screened and did some odd stuff, and I think at that moment some things got messed up), and I rather spend a few hours reinstalling than days fixing the next little thing and the next. Reinstall worked ofcourse, there was also nothing wrong with the e-mail database as is suggested in some forums.
Conclusion: Windows Live Mail itself was not broken, the mail database was not broken, but the .NET 2.0 framework (or parts of it) were corrupt. What Microsoft could (and should) do is give the user a proper error message so he knows what is broken, and what to do to fix it. From googling it looks like there are thousands of people with this problem, and I can't believe that nobody at Microsoft bothered to get to the bottom of this. When seeing all these reports they could have easily improved there error message handling and they would have very soon found out about what the problem was.
For donations you can contact me. I will also accept a brand new Surface Book from Microsoft in return for handling their application support.
- Wout