I solved this problem, but I do not know what caused it. I tried using DebugDiag to take a dump and parse it. The analysis showed that the process was expecting something in the compatibility module in some Microsoft code.
I noticed that IIS 8 has two compatibility databases installed. I deleted both elements and tried to run the application again. This time, the application successfully executed the line that was hanging.
Although this resolved the problem on this machine, I still don't know what causes the problem. I have a colleague with a similar configuration, and he has no problems with the application hanging on the above line, even with the installed compatibility databases.
source share