Hi Andrew,
From your description, you have an ASP.NET 2.0 application which use cache
to store objects. You found the application work fine on dev machine(in VS
2005 Test server) but can not persist cache on product server(win2k3 iis),
correct?
Based on the code snippet you provided, I think the code logic should be
correct and as you mentioned it work on dev machine, therefore, the
problem
is likely due to the deployment environment. Of course, there is no
particular limitation on Application cache between IIS hosted and VS 2005
test server enviornment. Would you tried the following things to further
simplify the issue?
** Create a new empty project and add a simple page to dedicated on using
cache to store objects(you can try both small objects and large objects)
** In the windows performance counters, you can add the ASP.NET cache
related counters(such as "CACHE API Entries" ) under the "ASP.NET APPs
V2.0....." category.
If the problem can be even reproted through such as simple project, it
will
make the problem much clearer.
If you have any other finding, please also feel free to post here.
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no
rights.
--------------------
From: "J055" <
[email protected]>
Subject: Application Cache question
Date: Mon, 3 Sep 2007 20:11:53 +0100
Hi
The following code works on my develeopment machine using the VS web server.
When I run the application on 2 other Windows 2003/IIS 6 servers no caching
seems to take place at all. Can someone explain what I might be doing wrong
or what to look out for? What's the differece between IIS and VS web server?
The IIS servers seem to have enough memory.
public DataTable GetAll()
{
DataTable dt;
// try to retrieve item from cache
dt = (DataTable)_context.Cache[_cacheKeyName];
if (dt == null)
{
dt = tableAdapter.GetAll();
_context.Cache.Insert(_cacheKeyName, dt, null, Cache.NoAbsoluteExpiration,
TimeSpan.FromSeconds(600));
}
return dt;
}
Many thanks
Andrew