"The located assembly's manifest definition does not match the assembly reference." occurs after some time

0

I'm using Visual Studio to build a software project and publish it to the target server (in the build menu the entry "publish"). After doing this, I test the software (a SOAP service) by submitting a request with SoapUI. Everything works as desired. Now I wait, say 30 minutes, and do the same request again. In the meantime, I haven't touched the SOAP service. But the same request now fails with the following error message from the service.

System.TypeInitializationException: The type initializer for 'Stomp.Net.Stomp.Util.IdGenerator' threw an exception. ---> System.IO.FileLoadException: Could not load file or assembly 'System.Net.NameResolution, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) ---> System.IO.FileLoadException: Could not load file or assembly 'System.Net.NameResolution, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

If I publish again now, I will have a working state again. But only for a few minutes until the above problem occurs again.

What could be the reason for this behavior and how can it be solved?

Update

I took a closer look at how long it takes for the error situation to occur and was able to measure that it was pretty much 20 minutes. This value corresponds to the IIS default setting for the Idle Time-out for an Application Pool. (The IIS used is unfortunately out of my control, so I can't verify my guess).

How could it come to my problem when the application pool wakes up?

c#
asp.net
.net
iis
gac
asked on Stack Overflow Nov 28, 2019 by datenstation • edited Nov 29, 2019 by datenstation

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0