Here are the questions copied from overflow
I ' ve read through many of the other questions posted on the same issue, but I still does not understand the cause and how to prevent it from happening.
In my case, this is happens on the production server. I get the same error that have been described in other questions, and I resolve it by re-copying the assemblies into the BI N directory. They is not even recompiled files, they is the same ones that were in there before-copied in again, and then it starts Working without problems.
The weird part of it was that I am using Web Deployment Projects to rename all of my assembly files into folder-based dll ' s . So Folder.dll and Folder.subfolder.dll instead of App_web_jt8nxllz.dll. Yet the error still names the original App_web_jt8nxllz.dll file.
Deleting the contents of the C:\WINDOWS\Microsoft.NET\Framework[64]\v...\Temporary ASP.NET Files
folder works and is all fine, but does anyone know how to prevent this error F Rom happening? Also, shutting down IIS or restarting it's really not so feasible when it's happening on the production server. Perhaps cleaning out of the Temp folder on a scheduler automatically?
What's the real issue here? Is there something in particular which causes this to happen? The site'll be humming along no problem @ all, and then all of the sudden, one entire folder stops working and produces This error.
Could not load file or assembly ' App_web_jt8nxllz, version=0.0.0.0, culture=neutral, Publickeytoken=null 'Or one of its dependencies. The system cannot find the file specified. Exception type ' System.IO.FileNotFoundException ' Was caught. Source:app_web_whv5zsvdtarget site:void __buildcontroltree (asp.artists_controls_artistheader_ascx) Stack Trace:at Asp.artists_controls_artistheader_ascx.__buildcontroltree (Artists_controls_artistheader_ascx __ctrl) at Asp.artists_controls_artistheader_ascx. FrameworkInitialize () at System.Web.UI.UserControl.InitializeAsUserControlInternal () at System.Web.UI.UserControl.InitializeAsUserControl (Page page) at asp._artists_artist_master.__ Buildcontrolctlartistheader () at Asp._artists_artist_master.__buildcontrolctlcontent (Control __ctrl) at System.Web.UI.CompiledTemplateBuilder.InstantiateIn (Control container) at asp.master_mysite_master.__ Buildcontrolmaincontent () at Asp.master_mysite_master.__buildcontrolform1 () at asp.master_mysite_master.__ Buildcontrolbody () at Asp.master_mysite_master.__buildcontroltree (Master_mysite_master __ctrl) at ASP.master_mysite _master. FrameworkInitialize () at System.Web.UI.UserControl.InitializeAsUserControlInternal () aT System.Web.UI.MasterPage.CreateMaster (TemplateControl owner, HttpContext context, VirtualPath MasterPageFile, IDictionary contenttemplatecollection) at System.Web.UI.MasterPage.get_Master () at System.Web.UI.MasterPage.ApplyMasterRecursive (MasterPage master, IList appliedmasterfilepaths) at System.Web.UI.Page.ApplyMasterPage () at System.Web.UI.Page.ProcessRequestMain (Boolean Includestagesbeforeasyncpoint, Boolean Includestagesafterasyncpoint)
Just link up my site but I had run into this issue and I wrote a blog post on the topic. Check it out, it had links to more info on the this topic. But to sum it up here is the details:
Problem:
The website is throwing an error trying to load a custom Web control. For the last release, we added a new custom control to another custom Web control, which is displayed as needed. Because the outer most/parent control and the new child control is separate controls in source, when the. Net Framework G OES to compile one of these, and does not recompile, the other one, at the same time, you'll have a-out of D Ate file trying to reference the old version of the assembly. The fact the. Net Framework appends a random string to the name of the Assembly at compile time the name of the newly Compiled file and the previous version of the file cause a file name mismatch and therefore the Outer/parent control is L ooking for a file, that no longer exists.
Possible work Around (s) or temporary Fixes:
1) By setting the batch property of the compilation tag to False in the Web. config file
<compilation debug="false" batch="false" />
2) can also decrease how often it happens by setting by the property numRecompileBeforeAppRestart
:
<compilation debug="false" numRecompilesBeforeAppRestart="50" />
See the KB article 934839 for more details
Fixes for the Issue after it had already taken place:
1) Delete Temp ASP. Net files (this takes the site)
2) force the Parent/outter control to recompile, edit and save the code file. This was a better option for a fix than #1 because this does not bring down the website.
My Suggestion:
1) First I think that we should put on place the temporary fix #1 from above, this might prevent all issues in the future And could is the only answer we need.
2) Second I would download and install the 934839 hotfix from Microsoft on the QA environment to verify that it does not C Ause any problems. After some time of testing the hotfix with QA I would install the hotfix to has a permanent fix for this issue. At this time we could remove the temporary work around #1.
Note: After putting Temp fix #1 I has not had the problem again. I have had this fix on place for over months and all are good!
ASP. Corrupt assembly "Could not load file or assembly app_web_*