I've got this really odd problem which im hoping is an easy one - something i've missed.
Im building a company intranet with ASP.net (VB) and an access 2003 database to hold the data - not alot of data. The problem is when ever anyone loads a page for the 1st time its really slow to load up (approx 1-2mins), once anyone has loaded that page the server caches it and anyone including others can use that page at which point it loads between 1-3secs.
Im running Server 2003, with .NET framework 2.0 and IIS 6. The browsers the company run are all IE7.
Any ideas?
Thanks in advance
"What does'nt kill us only makes us stronger!"
"The Shadowy Boulder May Harbour a Crouching Tiger, Giant Tree Roots May Shelter a Hidden Dragon"
You mean it take that long the first time the web site are accessed after being re-build, or each time a user visit it the first time.
Suggest you put a break-point in you main page's load event, and run it in debug mode on your developer machine. Could be you are calling some long running code (like database reads) serveral times due to post backs occuring.
I meant it takes a long time the first time after the site is built again or loaded first thing in the morning.
For example i left the site working fine last night (5pm), pages where loading quickly etc. When i have come in this morning the same has happened its takes ages to load up, now its loaded once however anyone on the network including me could go on the page and it would load up within a second or two.
any ideas?
"What does'nt kill us only makes us stronger!"
"The Shadowy Boulder May Harbour a Crouching Tiger, Giant Tree Roots May Shelter a Hidden Dragon"
Is this the only website on the server? If so, is the others fine?
If not, create another website, just a simple single page, and see how it load over the network.
Really not enough details to give you any specific advice.
What happens when your website loads...Do you have code in your "Application_Start" Event?
This is the second Intranet on the server, the old one will be de-comissioned when this one is ready. The old Intranet was designed using asp and runs quick and error free, but as soon as the server sees an aspx page it stalls for the first time an aspx page loads.
Just tried it this morning - i loaded up the index.aspx page (home page) then tried the other pages, the first page took ages to load, then for some reason the other pages all loaded really quickly, so i think that the server has a problem initiating the .net framework or something???
"What does'nt kill us only makes us stronger!"
"The Shadowy Boulder May Harbour a Crouching Tiger, Giant Tree Roots May Shelter a Hidden Dragon"
When you build a .net web application, you can either pre-compile it, or you can have the server compile it at runtime.
Pre-compiling it will do away with the "lag" you're talking about...but...everytime you make a change anywhere in the application you will have to recompile it again.
Letting the server compile it at runtime will result in the "lag" - but it should only do that the first time the app is run...at least until someone makes a change to something and it will have to recompile it again at runtime.
The only reason I can think of that it would lag like that just overnight ( assuming you didn't change anything in the app during the afternoon or whatever ) is if you turn the server off at night. Does it run all night or does it get shut down?
The server runs all night, the only thing i can think of is that when the backups are done, its flushing the server - what do you think?
I do like the idea of pre-compiling asp.net pages, before i go on a google hunt do you have any good information etc to precompile, i've never done it before.
Many thanks
"What does'nt kill us only makes us stronger!"
"The Shadowy Boulder May Harbour a Crouching Tiger, Giant Tree Roots May Shelter a Hidden Dragon"
I know enough about servers to get myself into trouble - that's about it
So I really don't know but I wouldn't think doing backups would affect it.
I can't help with pre-compiling your app...we never pre-compile them here where I work because we have hundreds of websites and many of them are being updated frequently. That would mean lots of extra work everytime a change is made. We just let the servers compile them on the fly.
What is with this server compiling whatever?
You guys make it sound like you are running something like visual studio on your production servers....?????
All you should have on your server is the .net framework you are using, IIS configured to use it, and only your pages (no code-behind), and your application's dll, along with any other dll's you allready compiled on your develoment system, and 3rd party components you might be using.
I guess I understand you wrong, because that assumption just sound a bit too ridiculous to be true
I don't use Visual Studio myself...I hand code everything. Therefore, there are no dll's being sent up to the server. So when someone requests the webpage, the server compiles the dll at runtime.
When it comes to web applications, I see no advantage ( other than the subject of this topic - the initial "lag time" on the first run ) to pre-compiling. I've read lots of articles going back and forth over this issue, and there doesn't really seem to be any clear advantage to doing so.
>>>As far I'm concerned, Microsoft's idea of "compile on demand" turned out to be nothing but an empty marketing glitch.
I don't see how you can possibly come to that conclusion. I've written thousands of aspx pages over the past few years that all work just fine being compiled on demand by the web server.
IF you are working on a very large and complex web application, and writing the entire thing in .net, then I can see where it would be a good idea to compile it into a dll. The point is...you don't absolutely have to do so.
When it comes to web applications, I see no advantage ( other than the subject of this topic - the initial "lag time" on the first run ) to pre-compiling. I've read lots of articles going back and forth over this issue, and there doesn't really seem to be any clear advantage to doing so.
Don
I guess you are right.....but then, I'm not the one with this problem..never had
Originally Posted by donwyo
>>>As far I'm concerned, Microsoft's idea of "compile on demand" turned out to be nothing but an empty marketing glitch.
I don't see how you can possibly come to that conclusion. I've written thousands of aspx pages over the past few years that all work just fine being compiled on demand by the web server.
if (microsoft.say("The sky is green")) {
sky="Blue";
}
Bookmarks