.NET|Issue with .aspx pages caching at Server side

G

Guest

Hi All,

In our Web hosting environment we are using Virtual hosting i.e. multiple
websites are on one server and multiple domains are pointing to a single
website.

Issue: We have two domains say “www.Test1.com†and “www.Test2.com†pointing
to a single website. Website content is located onto UNCPath i.e. remote
location.
Domain 1: www.Test1.com points to \\servername\websitefolder\homedirectory
Domain 2: www.Test2.com points to \\servername\websitefolder\homepage
Both the domains are having separate “default.aspx†page at their UNCPath
which is referring to the separate XML file with the same name i.e.
“count.xmlâ€.Our “Default.aspx†page is reading value from xml file and
displaying.The common code behind class is stored in the GAC.

When we are browsing both the page simultaneously from different servers and
refresh these pages in a short duration i.e. less than 15 seconds. Both the
pages start reading from the same XML file and display same data.

1.) We would like to know if this is server side caching ,can we
reduce/change the phenomenon of the refreshing of the .aspx pages.
2.) If the Namespace of both the .aspx page is the same then their will be
common compiled file of both the pages in the website cache location i.e.
Windows\Microsoft.Net\Framework\Version\TemporaryASP.NETFiles\<Website>
folder.

Please give us some inputs/suggestions to resolve the problem at the earliest.

Thanks,
Purti Malhotra
 
C

cp

Purti said:
Hi All,

In our Web hosting environment we are using Virtual hosting i.e. multiple
websites are on one server and multiple domains are pointing to a single
website.

Issue: We have two domains say "www.Test1.com" and "www.Test2.com" pointing
to a single website. Website content is located onto UNCPath i.e. remote
location.
Domain 1: www.Test1.com points to \\servername\websitefolder\homedirectory
Domain 2: www.Test2.com points to \\servername\websitefolder\homepage
Both the domains are having separate "default.aspx" page at their UNCPath
which is referring to the separate XML file with the same name i.e.
"count.xml".Our "Default.aspx" page is reading value from xml file and
displaying.The common code behind class is stored in the GAC.

When we are browsing both the page simultaneously from different servers and
refresh these pages in a short duration i.e. less than 15 seconds. Both the
pages start reading from the same XML file and display same data.

1.) We would like to know if this is server side caching ,can we
reduce/change the phenomenon of the refreshing of the .aspx pages.
2.) If the Namespace of both the .aspx page is the same then their will be
common compiled file of both the pages in the website cache location i.e.
Windows\Microsoft.Net\Framework\Version\TemporaryASP.NETFiles\<Website>
folder.

Please give us some inputs/suggestions to resolve the problem at the earliest.

Thanks,
Purti Malhotra

have you specified that you dont want caching on the client side? Using
something like ...
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="pragma" content="no-cache">

cp
 
G

Guest

Hello CP,
Thanks for taking interest in my issue ......No i haven't done any client
side caching...its not an issue of client side caching because i have tried
to browse both the domains from different machine.......and it gives the same
problem ...
Had few thought on it and analysised :
ASP.NET compiles the ASPX page the first time the user requests it and then
stores it into its cache. Next time around ASP.NET checks the cache to see if
the copy of the page exists. In case it cannot find one, it creates a
temporary source code file that represents the Page class. It puts it in the
temporary ASP.NET files folder that exists inside the
Windows\Microsoft.Net\Framework\Version\TemporaryASP.NETFiles\<Website>
folder.
Questions

1.) We would like to know if this is server side caching, can we
reduce/change the phenomenon of the refreshing of the .aspx pages.

2.) If we have two .aspx pages in a same website with the same name having
the same “Inherits†value i.e. used to associate a code-behind source file
with a Web page then there will be one compiled file at a time in the
Temporary ASP.NET files folder onto Web server.

Please let me kow if u have thoughts on it and answers to above questiions
 
C

cp

Server ... you could try
<%@ OutputCache Duration="0" Location="None" VaryByParam="none" %> or
Response.Cache.SetCacheability(HttpCacheability.NoCache);

That should prevent the caching - good luck!
 

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

Top