473,770 Members | 1,785 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ASP.net caches aspx Pages

Hallo,
I have a strange problem:
ASP.net caches my aspx pages, the code not the output.
For testing is created a page and inserted the folowing into the body:
<%=now.tostring %>
Every time I reload the page the correct date is shown.

So far so good. Now I add the following line:
<br>test12345

The page still shows the correct time everytime I realod, but the line above
does not appear until I restart the server.

The problem is that the aspx pages are compiles once and stored in the
Temporary ASP.NET Files directory. When I change one site it is not
recompiled until I restart the server.

What can I do?

Nov 18 '05 #1
8 1505
By adding: <br>test12345 to the .aspx page, you have NOT changed the
"code", you've changed the HTML. Simply re-saving the .aspx page with the
altered HTML will make the page update in page requests by browsers. If
yours isn't, my guess is that it is your browser that is caching the page,
not the server.

When I update any of the CODE in my web site (code that is in my code-behind
file), I will need to recompile my assembly (no need to restart the server
though). When I make a change to the HTML in the .aspx page, simply
re-saving the page is all that is required.
"Thorsten Tarrach" <th********@gmx .de> wrote in message
news:Oh******** ******@TK2MSFTN GP11.phx.gbl...
Hallo,
I have a strange problem:
ASP.net caches my aspx pages, the code not the output.
For testing is created a page and inserted the folowing into the body:
<%=now.tostring %>
Every time I reload the page the correct date is shown.

So far so good. Now I add the following line:
<br>test12345

The page still shows the correct time everytime I realod, but the line above does not appear until I restart the server.

The problem is that the aspx pages are compiles once and stored in the
Temporary ASP.NET Files directory. When I change one site it is not
recompiled until I restart the server.

What can I do?

Nov 18 '05 #2

"Scott M." <s-***@BADSPAMsnet .net> schrieb im Newsbeitrag
news:e3******** *****@tk2msftng p13.phx.gbl...
By adding: <br>test12345 to the .aspx page, you have NOT changed the
"code", you've changed the HTML. Simply re-saving the .aspx page with the
altered HTML will make the page update in page requests by browsers. If
yours isn't, my guess is that it is your browser that is caching the page,
not the server.
You are right. I change the HTML and save it.
When I update any of the CODE in my web site (code that is in my code-behind file), I will need to recompile my assembly (no need to restart the server
though). When I make a change to the HTML in the .aspx page, simply
re-saving the page is all that is required.


Before I reinstalled the system that was true for me too.
The page is NOT cached in the browser because the time is updated (you
remember <%=now.tostring %>).

Same thing happens if I change the code behind and recompile the assembly.
The newly added code is simply ignored. The problem is that the Temporary
ASP.NET Files folder does not change.

Nov 18 '05 #3
You have to shut down your browser and then you will see the new code
reflected. This is the correct behavior. When IIS detects a newer version
of the assembly, it will abandon the cached version ONLY when no one is
using it any longer.

Simply calling refresh is not enough, since IIS can tell by your session ID
that you are not a NEW user and it doesn't want to apply the new assembly to
you, since you've already initiated a session using the old one.
"Thorsten Tarrach" <th********@gmx .de> wrote in message
news:ut******** ******@tk2msftn gp13.phx.gbl...

"Scott M." <s-***@BADSPAMsnet .net> schrieb im Newsbeitrag
news:e3******** *****@tk2msftng p13.phx.gbl...
By adding: <br>test12345 to the .aspx page, you have NOT changed the
"code", you've changed the HTML. Simply re-saving the .aspx page with the altered HTML will make the page update in page requests by browsers. If
yours isn't, my guess is that it is your browser that is caching the page, not the server.


You are right. I change the HTML and save it.
When I update any of the CODE in my web site (code that is in my

code-behind
file), I will need to recompile my assembly (no need to restart the server though). When I make a change to the HTML in the .aspx page, simply
re-saving the page is all that is required.


Before I reinstalled the system that was true for me too.
The page is NOT cached in the browser because the time is updated (you
remember <%=now.tostring %>).

Same thing happens if I change the code behind and recompile the assembly.
The newly added code is simply ignored. The problem is that the Temporary
ASP.NET Files folder does not change.

Nov 18 '05 #4
Hallo,
here comes the solution.
The problem was that the Inetpub was physically stored on d: and linked to
c:\inetpub which was used by all applications.
The aspnet process is obviously not able to trace changes I perform on
c:\inetpub.
Thorsten

Nov 18 '05 #5
You have an InetPub on your C and your D drives? Then you have 2
installations of IIS. One would not be "linked" to the other, but I'm
wondering how you can have IIS (a Windows service) installed twice?
"Thorsten Tarrach" <th********@gmx .de> wrote in message
news:eD******** *****@TK2MSFTNG P10.phx.gbl...
Hallo,
here comes the solution.
The problem was that the Inetpub was physically stored on d: and linked to
c:\inetpub which was used by all applications.
The aspnet process is obviously not able to trace changes I perform on
c:\inetpub.
Thorsten

Nov 18 '05 #6

"Scott M." <s-***@BADSPAMsnet .net> schrieb im Newsbeitrag
news:Ov******** ******@TK2MSFTN GP09.phx.gbl...
You have an InetPub on your C and your D drives? Then you have 2
installations of IIS. One would not be "linked" to the other, but I'm
wondering how you can have IIS (a Windows service) installed twice?


No, I just copied Inetpub com C to D and deleted the directory on C. Then I
created a Link on C pointing to D. It's not a simple link windows explorer
creates, but an NTFS junction which really causes programms to believe this
directory is stored on C.
Normally this works fine, but the aspnet process is obviously confused by
this construction.

Nov 18 '05 #7
Why do it this way? So in IIS, it still looks like it's pointing to
c:\inetpub? Why not just change it to d:\ and remove this 'link'? I'm sure
you may have reasons for it, but it just seems like it would lead to
problems.

Brian
"Thorsten Tarrach" <th********@gmx .de> wrote in message
news:O6******** ******@TK2MSFTN GP09.phx.gbl...

"Scott M." <s-***@BADSPAMsnet .net> schrieb im Newsbeitrag
news:Ov******** ******@TK2MSFTN GP09.phx.gbl...
You have an InetPub on your C and your D drives? Then you have 2
installations of IIS. One would not be "linked" to the other, but I'm
wondering how you can have IIS (a Windows service) installed twice?
No, I just copied Inetpub com C to D and deleted the directory on C. Then

I created a Link on C pointing to D. It's not a simple link windows explorer
creates, but an NTFS junction which really causes programms to believe this directory is stored on C.
Normally this works fine, but the aspnet process is obviously confused by
this construction.

Nov 18 '05 #8

"Brian H" <no****@nospam. com> schrieb im Newsbeitrag
news:e0******** ******@TK2MSFTN GP11.phx.gbl...
Why do it this way? So in IIS, it still looks like it's pointing to
c:\inetpub? Why not just change it to d:\ and remove this 'link'? I'm sure you may have reasons for it, but it just seems like it would lead to
problems.


Yes, I changed it now.
Normally linking is the easiest way to avoid any problems after moving a
folder. For example after moving my whole user profile to d: and linking it
back to c:\documents... windows didn't notice the change.

Nov 18 '05 #9

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

Similar topics

5
4244
by: Phil Powell | last post by:
I created a page that will be doing image resizing and manipulation, which seems to work (using GD library). However, upon returning to the page where the image has been changed, I still see the old image, until I refresh my browser and then zappo, there it is! All changed! I have done everything I can think of to force caching including this: // Date in the past header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
1
2212
by: Paul | last post by:
Title: What are the Consequences of Aspx page separate from app DLL Hi JL; I am working on a big asp.net application. When we migrate the dll (or dlls) to the production server, all users who are login into the application are pumped off. In fact we must close down the server (to preserve users from being logged on and thinking they are updating data when it is in fact lost when we move the dlls to the the applications bin directory)....
8
1064
by: Thorsten Tarrach | last post by:
Hallo, I have a strange problem: ASP.net caches my aspx pages, the code not the output. For testing is created a page and inserted the folowing into the body: <%=now.tostring%> Every time I reload the page the correct date is shown. So far so good. Now I add the following line: <br>test12345
7
2346
by: J Smithers | last post by:
I have several ASPX pages (with code-behind logic) that I reuse amongst many Web sites on the same production server. Currently each Web site has its own copy of these aspx pages. I was thinking that it might be a good idea to move these common aspx pages to a new folder and then make them accessible via a new virtual directory in each Web site. Is this a good idea? Bad idea? Thoughts, opinions? Thanks!
2
2178
by: Janusz Jezowicz | last post by:
Hello! I would like to have one page on the server, which would be a target processing page for a number of other aspx pages. E.g Processing page \portal_page.aspx Target pages
3
1548
by: Mike Dee | last post by:
I posted this back in November 2005 a couple times but did not get any responses. I'm hoping someone here can please shed some light on this. I'm new to index server and can't get any DocTitle value back from index server (it is returned as null) for all my aspx pages. It do get the values from inside the <title> tags from my static .htm pages just fine. My aspx pages however are generated from master pages where the title tag is set...
13
3560
by: Bob Jones | last post by:
Here is my situation: I have an aspx file stored in a resource file. All of the C# code is written inline via <script runat="server"tags. Let's call this page B. I also have page A that contains some javascript code that calls window.open. I pass the resource url of page B to Page A's window.open call. Page B is then loaded and executed but none of the server-side code is rendered. If I view the source of the page, the code (and page...
3
1398
by: =?Utf-8?B?TWFyaw==?= | last post by:
Hi... At least by the group title, this seems like a question for dotnet.framework.aspnet.caching but that group seems pretty slow. I'm trying to sort things out with a co-worker. We've got some classes that implement some in-memory caches with static Hashtable members. My understanding is that a static Hashtable may be shared between threads in the worker process but that it won't span multiple worker processes.
8
2071
by: Wessel Troost | last post by:
We are using an XML data source in the Page_Load event of an ASP.NET page, like: protected void Page_Load(object sender, EventArgs e) { // Retrieve XML from web service for product idea in URL string sXML = GetXmlFromWebService(Request); XmlDataSource ds = new XmlDataSource(); ds.Data = sXML;
0
9617
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, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9454
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10099
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...
1
10037
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9904
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...
1
7456
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
5354
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
5482
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3609
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.