Clean up ASP.NET temporary assemblies without restarting IIS

I moved some OUT code from the App_Code folder, and now I have the problem of a classic conflict between the code that I am compiling in my project and the EXISTING temporary compiled assemblies in the temporary cache. I know that I can just delete temporary assemblies, but I need to stop IIS. I will need to do this in my deployment strategy all the way to our production environment and do not want to restart IIS. Is there any way to do this?

+4
source share
2 answers

Can you try

  • stop your site (not iis).
  • try to delete temporary files

the second option can be (dangerous) 1. kill the asp.net workflow (this is a criminal blocking of files in the temp folder) 2. Try to delete temporary files.

it is difficult to understand which process actually blocks files, if it runs in an ISAPI environment, that is, in an exp wp file, you can use some file monitoring tools to find out the identifier of the process that accesses / blocks the file, then use the task manager to kill it .

greetings.

+1
source

Try making a small change in the web.config file, for example, configure a parameter whose sole purpose is to be changed, and then save. If web.config is modified, it will force the site to recompile and restart the process. It is also a way to clear cached data. I am not sure if saving the web.config file is enough to update the modified date. Usually I just change the meaning or something like that. I never tried to automate it, but maybe I think.

+1
source

All Articles