Problem:
When using .NET 4.6+ the Office viewers or op/generate.aspx will not work and give the following “This page can’t be displayed” error.
Image may be NSFW.
Clik here to view.
Cause:
The new .NET Framework version 4.6 and higher includes a new Just-In-Time (JIT) compiler.
Solution:
A couple of workarounds are detailed here (https://github.com/Microsoft/dotnet/blob/master/docs/testing-with-ryujit.md#net-framework-46—troubleshooting-ryujit)
The easiest workaround identified is to use the following registry key to disable the new JIT compiler on the Office Web Apps server that will be using op/generate or the Office viewers.
Using Registry Editor (regedit.exe), find either of the following subkeys:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework
Then, add the following:
Value name: useLegacyJit
Type: DWORD (32-bit) Value (also called REG_WORD)
Value: 1