.Net 4.0 Windows Application crashes in clr.dll under Windows Server 2008 .Net 4.0 Windows Application crashes in clr.dll under Windows Server 2008 windows windows

.Net 4.0 Windows Application crashes in clr.dll under Windows Server 2008


I'm having the same issue. At approximately 8-10 hours of application life CLR error rises. I suspected my unmanaged code generating exception in the background thread. However I could not really find out why. You can give the following a try however:

Please let me know if you have already found a solution.


I had a similar problem, so this can help future user to find a solution :

We use Apache log4net for application log.

After an update to DLL version 1.2.15, for dotnet Framwork 4.5 it starts to fire this exact exception once the log file reach the maximal size (10MB)


The hot-fix has mostly vanished and I faced a similar issue, so I'll share my answer here.

My solution revolved around the fact that I was passing a Lamda to a P/Invoke:

https://stackoverflow.com/a/52360307/4700841