caching in asp.net development server

2020-03-25 01:12发布

问题:

Details: I am using visual studio 2005 on windows xp sp3. The website is stored on file system. I used subversion to checkout the code from the server.

Here is the issue: When I run the application for the first time everything is fine. But when I makes changes in the application then I should just be able to see those changes by reloading the page in browser. But it's not happening. I have to stop the development server and re-run the application which will start a new instance of development server and now I can see the changes. This takes like 3-4 minutes and it's a lot of waste of time which I can't afford.

For my fellow developer who is here for a long time everything is just working fine. He can just modify the page and reload the page in browser to see the changes.

Reading some forums on web, I tried to clear the cache of my browser (IE, Firefox) and it's not working. So, it's not a browser's cache issue. It's related to cache in development server.

Any ideas are appreciated!!!

回答1:

Thanks for the help guys. It was actually my fault. I actually disabled directory monitory day before yesterday because it wasn't allowing me to build the website. I just found that solution on some forum. I had no idea what that thing was at that time, I was just happy that it worked.

This is the link: http://support.microsoft.com/kb/911272

I set the value to 2 for 'HKLM\Software\Microsoft\ASP.NET\FCNMode' registry key. If I set it to 0 then project goes into an infinite build, may be it's because of the slow machine. The value 2 works for me.



回答2:

Are you building the code? are the changes to code behind (.aspx.cs or .aspx.vb) or the code in front pages (.aspx)

For code behind changes If you detach the debugger (hit the blue square stop button) and rebuild, then yes you should be able to ctrl-f5 (hard refresh) your browser and see the changes. For code in front changes, once saved, refreshing the browser should be enough.