简体   繁体   中英

Clear ASP.NET Temporary Assemblies Without Restarting IIS

I moved some code OUT of the App_Code folder and now I'm getting the classic conflict issue between the code I'm compiling in my project and the EXISTING temporary compiled assemblies in the temporary cache. I know I can just delete the temporary assemblies, but I this requires stopping IIS. I will need to do this in my deployment strategy all the way up to our production environment and don't want to restart IIS. Is there a way to do this?

Can you try

  1. stop your website (not iis)
  2. try deleting the temporary files

second option could be (risky) 1. kill asp.net worker process (this is the criminal locking out the files in temp folder) 2. try deleting the temp files.

its difficult to recognize what process is actually locking out the files, if its running in a not ISAPI environment, ie a wp exe file, you can use some file monitoring tools to find out the process id which is accessing/locking the file, then use task manager to kill it.

cheers.

Try making a small change to the web.config file like maybe set up a setting who's sole purpose is to be changed, and then save. If the web.config is change it will force the site to re-compile and restart the process. This is also a way to clear out cached data. I am not sure if just saving the web.config file to update the modified date is enough. I usually just change a value or something. I have never tried to automate it, but it would be possible I think.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM