开发者

Using IIS for localhost ASP.NET web app very slow to rebuild

We use IIS to host our Visual Studio 2008 apps (ASP.NET 2/3.5) on localhost as opposed to 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 whole minute to respond to the first request. I assume it's doing its own compiling or something.

Is there anything I 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 am interested in resp开发者_开发技巧onses on how to speed up localhost with IIS!


IIS is doing its own compile when you first visit the website, and that's what's causing this delay. I think IIS compiles on-demand, though, so I'm surprised to hear that it's taking a full minute to view the first page.

How's the disk performance on the web server - is it generally slow, or full/fragmented? Is there memory contention? The first step would be to see if there's some way you can augment the resources available in that server - either by adding more or by stopping/moving any unnecessary services - to see if that helps.

If that doesn't have an impact on the compile time when you first visit, you can try adding a step to your build process that visits the website in the background, which would cause it to pre-compile. It wouldn't do away with your wait time, but it would start the compile immediately, so the site is available as soon as possible. You can read about custom build steps at MSDN: http://msdn.microsoft.com/en-us/library/ms366724(VS.80).aspx

I'm interested to know what solves this problem.


Run the Process Monitor to see what resources(Network, File, Registry, Threads) are being consumed and see any unnecessary resource(remote https, costly file reads) are being consumed

I had similar problem. When I run the process monitor I found that my fusion log is enabled so there are many into the disk which delayed the loading of dll after disabling fusion log IIS Express it is faster.

Using IIS for localhost ASP.NET web app very slow to rebuild

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜