ASP.NET will forget the DLL in the bin directory

We have a plug-in system in the WCF service that checks the libraries located in the bin folder for specific build-level attributes and loads them. This allows you to configure specific calls based on which client makes the call. This works great most of the time. However, sometimes it seems that it will lose the dll, which causes the service to return to the default implementation for each client. So far, the solution has been to simply move the dll file from the bin folder and back. This causes asp.net to take the file, and the settings start working again.

I am at a loss as to why the assembly was skipped through this after a certain time. Any ideas as to what could be causing this?

Edit: The problem is more clearly worded.

Our services use the factory service to issue custom implementations based on which client calls the code. If there is no special implementation, we pass the default implementation. We use GetAssemblies to test assemblies that are decorated with an attribute that designates them as a custom implementation, and associates them with the client. The problem is that GetAssemblies stops returning the client assembly, although the library remains in the bin folder. Moving the dll from the hopper and back to it will fix the problem for about a week, until it repeats.

+3
source share
5 answers

? ... ? bin ASP.NET, . , - ... .. , / . , , , . FileMon , .

... "" DLL? , , ? ? ?

0

GetAssemblies . , . Assembly.Load , ; /bin .

, Managed Extensibility Framework (MEF), , .

0

... \bin .

http://msdn.microsoft.com/en-us/library/5dws599a(VS.71).aspx

Application_Start global.aspx?

0

Assembly tooltip contours are checked only once, when your AppDomain loads, even if you explicitly tell it to load the assembly by name, it will not find it. To solve this problem, you need to restart the main AppDomain or create an additional AppDomain and use it to load the assembly, this is what I have done in the past and it works great. However, it carries the overhead of the second AppDomain, not sure if this is a big deal or not.

0
source

Source: https://habr.com/ru/post/1736837/


All Articles