This is not a code problem. It's the way .NET works. ASP.NET watches the files system. If there are changes that it feels are critical enough it will reset the application state. What is contained in the folder that you are renaming? Is it possible to move this out of the scope of the virtual application?
-
Peter