3

Every time my app pool is recycled, all the pages take very long for the first request. I have a way of keeping the non-authenticated pages warmed up by making a call to them programatically before adding a server back in the load balancer.

For pages that require authentication (we use forms authentication) I'm not sure how to warm up these pages before adding a server in the load balancer.

Can you please help with some ideas? I'm using ASP.NET 3.5 and IIS 6

Thanks

user205892
  • 311
  • 1
  • 8

1 Answers1

2

I think what you are after is precompilation of your pages. Because your application has been restarted again the designer code for the pages has to be compiled again. This takes place after each request.

There is however ways to precompile all of your pages before any requests are made. By precompiling your pages there won't be a need to request each page programmatically to compile them.

Here are some links outlining how to do this -

http://msdn.microsoft.com/en-us/library/399f057w%28v=vs.85%29.aspx

http://www.asp.net/web-forms/videos/how-do-i/how-do-i-precompile-an-aspnet-website

http://odetocode.com/code/417.aspx

startupsmith
  • 5,554
  • 10
  • 50
  • 71
  • I'm using a Web Application Project instead of a Website Project. From what I understand about precompilation, it only works for Website Projects and not WAP projects. – user205892 Dec 21 '11 at 07:25
  • Here is an answer for precompilation with a web application project http://stackoverflow.com/questions/3588515/how-to-precompile-a-web-application-project. – startupsmith Dec 21 '11 at 07:30