ASPNet 2.0 precompilation and speed question

J

Jason Huang

Hi,

I tested my ASPNet web application and then found it takes a long time to
start at the first time.
So I surfed the web and found using aspnet_compile method.
When I execute the aspnet_compile -v /MyWeb, the compilation is OK and
returns no error.
But I found the speed didn't get promoted much, it still took long time to
open the application at the first time.
Would someone give me some advice?
Thanks for help.


Jason
 
S

Samuel R. Neff

The first time a site is hit IIS must load the asp.net worker process
and basically start up the .NET runtime. That takes a little bit of
time and is very noticeable on first hit.

You can use some outisde process like a scheduled task to force a load
when the computer starts up by requesting any random url within your
application, but ASP.NET will shut down the application based on
inactivity soon thereafter.

One thing I've done with some success is use a plain HTML file as the
first page and have that reference an aspx file (for an image or
something unimportant). The HTML file gets delivered quickly and the
referenced aspx file forces ASP.NET to load. You can have your app
generate the start page HTML file so it is not truely static. May not
work in all situations, but does in some.

HTH,

Sam
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top