IIS: Failed to load CoreCLR with non-existing file

Müller Matthias 0 Reputation points
2024-03-20T13:32:49.8766667+00:00

Hello there

We have really strange behavior; having an IIS, which hosts multiple .NET Core (respectively .NET7 and .NET8) systems, we added a new one.

Since then, we very randomly receive errors like this for seemingly all the .NET 8 systems:

Application '/LM/W3SVC/43/ROOT' with physical root 'C:\inetpub\wwwroot\xxx_dev4' failed to load coreclr. Exception message: Unexpected exception: directory_iterator::directory_iterator: The system cannot find the path specified.: "C:\inetpub\wwwroot\xx_dev4\wwwroot\bootstrap"

Now, the problem seems to be, that for the .NET8 applications, we used the inprocess hosting model, not the out of process one like here explained: https://stackoverflow.com/questions/59369322/net-core-3-0-and-iis-http-error-500-30-ancm-in-process-start-failure-failed

What bothers us: We used inprocess one for almost a year now and never had problems. Even systems, which were not touched for months, started to get this error after a new system was deployed. Just to explain: the wwwroot\bootstrap folder doesn't nor should exist for the systems failing, and sometimes it gives error for other files.

Restarting the IIS also randomly threw this errors for certain paths, almost like a first-system-wins pattern.

This opens a whole can of problems; we can destabilize existing systems just by using inprocess models, even when not touching them. If eels like the IIS is mixing up requests and systems, but I have no idea how to further analyze the issue, as it's not always reproducible.

Do you have any idea, how something like this can happen?

Greetings

Matthias

Internet Information Services
ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,166 questions
{count} votes