473,811 Members | 2,566 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Caching (possibly IIS related?)

Hi all,

I have a web application which gets *very* few hits, especially as its only
just been launched, but even after that it'll be a "quiet" site.

My problem is that when I am the first person to visit it for the day (like
this morning) it takes much longer to load - my understanding (having
attended a MS asp.net course some time ago) was that this is because its
doing the recompile to MSIL (please correct me if I'm wrong). I brought
this up on the course and the instructor chappy did say something about how
to extend its cache so that it didn't do it every day - perhaps once a week
or something - but it was a while ago and do you think I can remember what
he said - nope!

Can anyone give me any suggestions on how to get around this problem - the
content of the site is not dynamic and will only ever change if the client
contacts me to update it - therefore to be honest I would be happy to set
the cache at say 6 months or something longer so that this constant rebuild
problem goes away and thus the site loads faster for the occasional user
that does actually browse to it! :o)

Any help appreciated - I wasn't sure whether the solution to this would be
in the code or possibly within IIS so please excuse my posting if this is
the incorrect group.

Regards

Rob
Apr 28 '06 #1
7 1290
Cache normally referrers to things like the caching API and OutputCache. I
certainly hope that if your site is highly static, you use OutputCache a lot
to help the overall performance.

However, when talking about intial load, this is related to ASP.NET's Just
In Time (JIT) compilation. If you open up:

C:\WINDOWS\Micr osoft.NET\Frame work\v1.1.4322\ CONFIG\machine. config
(recommend you back it up first)

and do a searhc for <processModel there are a lot of settings (all well
documented in the same file) you can change to dictate when ASP.NET recycles
itself.

If you are running IIS 6.0, there's a tab that controls many of these
settings also (under the application pool properties)

Alternatives:
-You could set up a scheduled task that simply hits one of the aspx pages
every 30 minutes or so...
-ASP.NET 2.0 has a number of compilation features, some of them do away with
the problem you mention

Karl

--
http://www.openmymind.net/

"Rob Meade" <ku************ ***@edaem.bor> wrote in message
news:%2******** ********@TK2MSF TNGP04.phx.gbl. ..
Hi all,

I have a web application which gets *very* few hits, especially as its
only just been launched, but even after that it'll be a "quiet" site.

My problem is that when I am the first person to visit it for the day
(like this morning) it takes much longer to load - my understanding
(having attended a MS asp.net course some time ago) was that this is
because its doing the recompile to MSIL (please correct me if I'm wrong).
I brought this up on the course and the instructor chappy did say
something about how to extend its cache so that it didn't do it every
day - perhaps once a week or something - but it was a while ago and do you
think I can remember what he said - nope!

Can anyone give me any suggestions on how to get around this problem - the
content of the site is not dynamic and will only ever change if the client
contacts me to update it - therefore to be honest I would be happy to set
the cache at say 6 months or something longer so that this constant
rebuild problem goes away and thus the site loads faster for the
occasional user that does actually browse to it! :o)

Any help appreciated - I wasn't sure whether the solution to this would be
in the code or possibly within IIS so please excuse my posting if this is
the incorrect group.

Regards

Rob

Apr 28 '06 #2
And don't forget to disable debugging in web.config.

Apr 28 '06 #3
"Karl Seguin [MVP]" wrote ...
Cache normally referrers to things like the caching API and OutputCache. I
certainly hope that if your site is highly static, you use OutputCache a
lot to help the overall performance.
Erm nope - thats a new one for me - should I just F1 - "outputcach e" or do
you have a small example I could use?
However, when talking about intial load, this is related to ASP.NET's Just
In Time (JIT) compilation. If you open up:
yep
and do a searhc for <processModel there are a lot of settings (all well
documented in the same file) you can change to dictate when ASP.NET
recycles itself.

If you are running IIS 6.0, there's a tab that controls many of these
settings also (under the application pool properties)
I am yes, so perhaps I should look here - or do I need to do both?
-ASP.NET 2.0 has a number of compilation features, some of them do away
with the problem you mention


Its written in ASP.Net 2.0 -so again if you have any examples, or a URL you
could point me to for that I would be very grateful.

Thank you for your reply Karl.

Regards

Rob
Apr 28 '06 #4
"the4man" wrote ...
And don't forget to disable debugging in web.config.


Does that still apply in .Net 2.0? My previous experience from using Visual
Studio 2003 was basically a case of building the application in either DEBUG
or RELEASE mode, my understanding was that it would only use the settings in
the web.config file if it had been built in DEBUG mode.

In VisualStudio 2005 the only build option is DEBUG, however there's an
option to "Publish" the project- I had assumed, and possibly incorrectly,
that you were always in DEBUG mode until you published, at which point
VS2005 would change this to effectively a RELEASE build.

Any info on this would be appreciated.

Thanks for your reply.

Regards

Rob
Apr 28 '06 #5
re:
And don't forget to disable debugging in web.config.
Does that still apply in .Net 2.0?


Yes, it does...unless you pre-compile the website.

See :
http://msdn.microsoft.com/library/de...t_projects.asp
for full details.

Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en espaol : http://asp.net.do/foros/
=============== =============== =====
"Rob Meade" <ku************ ***@edaem.bor> wrote in message
news:uy******** ******@TK2MSFTN GP04.phx.gbl... "the4man" wrote ...
And don't forget to disable debugging in web.config.


Does that still apply in .Net 2.0? My previous experience from using Visual Studio 2003 was
basically a case of building the application in either DEBUG or RELEASE mode, my understanding was
that it would only use the settings in the web.config file if it had been built in DEBUG mode.

In VisualStudio 2005 the only build option is DEBUG, however there's an option to "Publish" the
project- I had assumed, and possibly incorrectly, that you were always in DEBUG mode until you
published, at which point VS2005 would change this to effectively a RELEASE build.

Any info on this would be appreciated.

Thanks for your reply.

Regards

Rob

Apr 28 '06 #6
googling OutputCache will gve you a lot of hits...it won't improve initial
load time, so if your happy with ur site otherwise, it might not be worth
the bother.

Since ur in 2.0, check out:
http://weblogs.asp.net/scottgu/archi...06/429723.aspx

there's a deployment project that has a bunch of options...

and if you are using the Express line of tools, you can use this free 3rd
party utility to help you out:
http://www.west-wind.com/tools/aspnetcompiler.asp

Karl
--
http://www.openmymind.net/
http://www.fuelindustries.com/
"Rob Meade" <ku************ ***@edaem.bor> wrote in message
news:OW******** ******@TK2MSFTN GP03.phx.gbl...
"Karl Seguin [MVP]" wrote ...
Cache normally referrers to things like the caching API and OutputCache.
I certainly hope that if your site is highly static, you use OutputCache
a lot to help the overall performance.


Erm nope - thats a new one for me - should I just F1 - "outputcach e" or do
you have a small example I could use?
However, when talking about intial load, this is related to ASP.NET's
Just In Time (JIT) compilation. If you open up:


yep
and do a searhc for <processModel there are a lot of settings (all well
documented in the same file) you can change to dictate when ASP.NET
recycles itself.

If you are running IIS 6.0, there's a tab that controls many of these
settings also (under the application pool properties)


I am yes, so perhaps I should look here - or do I need to do both?
-ASP.NET 2.0 has a number of compilation features, some of them do away
with the problem you mention


Its written in ASP.Net 2.0 -so again if you have any examples, or a URL
you could point me to for that I would be very grateful.

Thank you for your reply Karl.

Regards

Rob

Apr 28 '06 #7
Additionally, here's what Scott Guthrie has to say about
deploying applications with <compilation debug="true" />

http://weblogs.asp.net/scottgu/archi...11/442448.aspx

I found out about <deployment retail="true"/> with that blog entry.

Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en espaol : http://asp.net.do/foros/
=============== =============== =====
"Juan T. Llibre" <no***********@ nowhere.com> wrote in message
news:%2******** ********@TK2MSF TNGP02.phx.gbl. ..
re:
And don't forget to disable debugging in web.config.


Does that still apply in .Net 2.0?


Yes, it does...unless you pre-compile the website.

See :
http://msdn.microsoft.com/library/de...t_projects.asp
for full details.

Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en espaol : http://asp.net.do/foros/
=============== =============== =====
"Rob Meade" <ku************ ***@edaem.bor> wrote in message
news:uy******** ******@TK2MSFTN GP04.phx.gbl...
"the4man" wrote ...
And don't forget to disable debugging in web.config.


Does that still apply in .Net 2.0? My previous experience from using Visual Studio 2003 was
basically a case of building the application in either DEBUG or RELEASE mode, my understanding
was that it would only use the settings in the web.config file if it had been built in DEBUG
mode.

In VisualStudio 2005 the only build option is DEBUG, however there's an option to "Publish" the
project- I had assumed, and possibly incorrectly, that you were always in DEBUG mode until you
published, at which point VS2005 would change this to effectively a RELEASE build.

Any info on this would be appreciated.

Thanks for your reply.

Regards

Rob


Apr 28 '06 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

15
3423
by: olle | last post by:
Hi folks. I learning asp.net and compare it with traditional asp and Access-developing. The issue is this one: 1/I have this Ms Acceess adp-project application that works fine on my Ms Sql server database. In my main form I have an Access-combobox with Customer-names from my customer table. In this combo-box are about 2000 records.
4
1620
by: Gav | last post by:
Hi all, I'm having this strange problem where, in a web app, I have 2 different links to a different form. One is just a straight forward link the other is a bit more complicated because it gets there from a user control I wrote to display a menu. However both call the page in the same way using window.open('page.aspx','_top'); The problem is that:.... The page it calls, in the page load, checks to see if a session variable is null,...
2
1511
by: moondaddy | last post by:
My default page stays constant in the site and all the content in the body of the page is produced with user controls in a table cell for the body section. The main function of this site is a products catalogue and the products show in a datagrid in one of the user controls. This datagrid has many rows and columns of images and this is what I'm most interested in caching. If I put <%@ OutputCache Duration="500" VaryByParam="MenuID"...
10
1474
by: BillGatesFan | last post by:
I'm trying to understand ASP.NET caching. I set the Page Output directive to VaryByParams= None and the duration = 60. Now whenever users hit my web app they can see each others data. Is there anyway to cache the page without this happening or am I using Page Output caching in the wrong situation? It's a data entry web app that I'm trying to increase the performance on.
2
1607
by: Nalaka | last post by:
Hi, I have the following requirement for caching a asp.net 2.0 page. Can some one please tell me if this is possible.... and a some direction would also be wonderful I have a ASP.net 2.0 page with 1 user control. 1.1 I want the main page to be cached for a day.
1
1755
by: Kevin Burrowes | last post by:
I need to implement caching for a large enterprise application and we are planning to use the newest Caching Application Blocks. (Enterprise Library Jan. 2006) We want to cache Business Entities (DTO's) at the service layer and have a few questions. Are there other options than using Microsoft Caching blocks - possibly open source?
3
1978
by: Gary W. Smith | last post by:
I had a couple questions about data caching. We have a site that gets a huge amount of traffic to a few specific pages that have a lot of data on them (300k hits/hour during peak, about 6-10 data calls per page OR 500 SQL calls per second). Most of the data doesn't change more than once ever 10 minutes. Basically they are data islands with specific content. We have already implemented a singleton that manages a connection pool. This...
12
2083
by: =?Utf-8?B?RGF2ZQ==?= | last post by:
I'm using ASP.Net with an UpdatePanel. When the screen is exercised via a Web Test, the Web Test shows that the AJAX scripts are downloaded for every partial post back. My impression was that IE would cache these scripts so that the AJAX script download would only occur once. What am I missing?
1
1514
by: Mateusz Viste | last post by:
В Четверг 16 октября 2008 17:21, sasuke писал: There is many requests indeed, but it's rather normal - Steve has put online various weird stuff which needs to be loaded :-) As for the binary clock, my Firefox sends the following commands: GET /stephen.joung/binclock_8.jpg HTTP/1.1 GET /stephen.joung/binclock_4.jpg HTTP/1.1 GET /stephen.joung/binclock_2.jpg HTTP/1.1 GET /stephen.joung/binclock_1.jpg HTTP/1.1
0
9730
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, well explore What is ONU, What Is Router, ONU & Routers main usage, and What is the difference between ONU and Router. Lets take a closer look ! Part I. Meaning of...
0
10651
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10392
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10136
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9208
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing, and deploymentwithout human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7671
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupr who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5555
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5693
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3868
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.