Strange ASP.NET temporary dll FileNotFoundException!
I have strange problem during developing my ASP.NET website.
Facts:
- The project is a "Website" not web application
- Application pool runs under "Local system开发者_StackOverflow社区"
- IIS 7.0 is in use
- By killing iis worker process or restarting iis issue is gone.
I randomly get the following error from random locations!
Could not find file 'C:\Windows\TEMP\rksbjov5.dll'.
where each time dll name is something random.
Has anybody had this issue before? Any solution? or Why is this happening?
This is a known problem ...
Its because when you are debugging a website in visual studio you are constantly getting half way through things then stopping so memory leaks occur then files get randomly locked then a rebuild occurs and not everything is rebuilt.
perform an IIS reset then flush out the asp.net temporary files in the folder C:\windows\microsoft.net\your framework version\temp asp.net files\
you wont be able to delete all of these files without an iis reset.
This is simply a sign of not ideal integration between visual studio and IIS ... thats why visual studio comes with its own web service that you can use because on every rebuild the server is dropped, the app is recompiled, the service is the restarted and the app / site reloaded in to the fresh web service.
This is a particularly annoying problem when you do things like using db connections and don't close them before breaking out of a code block (typically happens when debugging) think of it as being much the same as calling gc.colect without having actually marked anything for garbage collection yet.
annoying i know.
精彩评论