Using IIS for a local ASP.NET web application is very slow to rebuild
We are using IIS to host our Visual Studio 2008 (ASP.NET 2 / 3.5) applications on localhost, not Cassini.
The only problem with this approach (I'm using IIS7 on Windows 7, but the problem also exists on XP with IIS 5.1) is that after each compilation, IIS takes 1 full minute to respond to the first request . I am guessing it is doing its own compilation or something.
Is there anything you can do to speed this up?
Every time I make a code change and recompile, I have to wait a minute.
Please don't suggest using Cassini, I'm interested in answers on how to speed up localhost using IIS!
a source to share
IIS does its own compilation the first time you visit the website and that's what causes this delay. I think IIS compiles on demand, so I'm surprised to hear that it takes a full minute to view the first page.
How is disk performance on a web server usually slow or full / fragmented? Is there a memory conflict? The first step is to see if there is any way to increase the resources available on this server, either by adding more or by stopping / moving any unnecessary services - to see if that helps.
If this does not affect compilation time on first visit, you can try adding a step to the build process that visits the website in the background, which will cause it to be precompiled. This won't do away with your latency, but it will start compiling right away, so the site will be available as soon as possible. You can read about custom build steps on MSDN: http://msdn.microsoft.com/en-us/library/ms366724(VS.80).aspx
I am interested to see what solves this problem.
a source to share
Run Process Monitor to see what resources (network, file, registry, threads) are consumed and see any unnecessary resource (remote https, expensive file reads) are consumed
I had a similar problem. When I start the process monitor, I find my merge log is on, so there is a lot on disk that delays loading the dlls after Fusion IIS Express log off is faster.
a source to share
