ServiceActivationException in WCF service after Windows update: Failed to load file or assembly 'App_global.asax.vtxl8efb, Version = 0.0.0.0

I have a .NET 3.5 web application installed in IIS that provides several WCF services. This has been deployed to dozens of companies for more than a year, but one server recently discovered this error when calling a service or switching to a .svc file in IE:

System.ServiceModel.ServiceActivationException: The service '/MyService/MySyncService.svc' cannot be activated due to an exception during compilation. The exception message is: Could not load file or assembly 'App_global.asax.vtxl8efb, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.. ---> System.IO.FileNotFoundException: Could not load file or assembly 'App_global.asax.vtxl8efb, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified. File name: 'App_global.asax.vtxl8efb, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' at System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) at System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) at System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) at System.Reflection.Assembly.Load(String assemblyString) at System.ServiceModel.Activation.ServiceHostFactory.CreateServiceHost(String constructorString, Uri[] baseAddresses) at System.ServiceModel.ServiceHostingEnvironment.HostingManager.CreateService(String normalizedVirtualPath) at System.ServiceModel.ServiceHostingEnvironment.HostingManager.ActivateService(String normalizedVirtualPath) at System.ServiceModel.ServiceHostingEnvironment.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath) 

During the weekend the windows were updated on the server, after which this error occurred and the service did not work. Another .NET 3.5 web application, not WCF, worked fine on the same server.

I managed to solve the problem by stopping the application pool, deleting the files in C: \ WINDOWS \ Microsoft.NET \ Framework \ v2.0.50727 \ Temporary ASP.NET Files \ myservice and starting the application pool again.

But I really would like to know why this will happen and what I can do to prevent it. It does not seem reasonable to ask all my clients to go through these steps after they have applied the Windows updates.

I do not use a web deployment project with any of these applications (the only links to such an error that I can find, all relate to web deployment projects like this ). My web application project is built and then copied.

This is a bit like this issue from MS, for which they released a patch, but not really the same thing.

Cross-reference in MSDN Forums .

+4
source share
1 answer

It is rather a historical assumption that, I think, you see what I saw at my last work.

The problem occurs when you install a security update or .net infrastructure update, and the application [site] is still used during the installation of the update. It cannot clear the necessary files, and it does not count as an event that will mark the shadow copied cache as dirty so that it does not recompile. The problem is that the DLL is now impossible to access because [and this is where I am not 100% sure). I think the entry points have changed to a DLL, so the DLL does not seem to be the right system, Since it could not find what it thought was correct, it throws the above exception. If you want the system to display your application as changed by touching the [dll or config] file, this should be enough to make it recompile the shadow copy.

+1
source

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


All Articles