Service cannot be started. System.TypeInitializationException: The type initializer for 'Microsoft.Office.Web.Common.Log' threw an exception. ---> System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.

Ricardo Demanet_c 11 Reputation points
2023-05-03T12:48:08.4633333+00:00

I get this message when I try to configure the Office Online Farm:
I have installed the latest march 2023 security patch, but it doesn't seem to make any difference.
Anyone knows how to fix it?

According to specifications OOS supports Windows Server 2022.
I am installing on Windows Server 2022 Datacenter

Service cannot be started. System.TypeInitializationException: The type initializer for 'Microsoft.Office.Web.Common.Log' threw an exception. ---> System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.
   at System.String.ReplaceInternal(String oldValue, String newValue)
   at System.String.Replace(String oldValue, String newValue)
   at Microsoft.Office.Web.Common.Log.GetQuotedEscapedStringOrNull(Object input)
   at Microsoft.Office.Web.Common.Log.GetMessageForExceptionLogging(String verb, Exception originalException, Tuple`2[] info)
   at Microsoft.Office.Web.Common.Log.TraceWithoutRetraceOnExceptionTag(UInt32 tag, String verb, Exception originalException, Tuple`2[] extraInfo)
   at Microsoft.Office.Web.Common.Log.WriteEventTag(UInt32 tag, EventId id, Object[] insertionData)
   at Microsoft.Office.Web.Common.Log.TraceWithoutRetraceOnExceptionTag(UInt32 tag, String verb, Exception originalException, Tuple`2[] extraInfo)
   at Microsoft.Office.Web.Common.Log.WriteEventTag(UInt32 tag, EventId...

Microsoft Office Online Server
Microsoft Office Online Server
Microsoft on-premises server product that runs Office Online. Previously known as Office Web Apps Server.
585 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Ricardo Demanet_c 11 Reputation points
    2023-05-03T13:05:21.81+00:00

    I have solved it.
    I copied the registry tree under "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\EventLog\Microsoft Office Web Apps" from another installation. Pasted in the new server and it worked.

    2 people found this answer helpful.