all groups > dotnet web services > july 2004 >
You're in the

dotnet web services

group:

Problem with output caching



Problem with output caching Jack
7/29/2004 3:39:27 PM
dotnet web services: Is anyone able to get output caching to work on web services?

I have followed KB 318299 which involves adding a method like the one below and calling twice within a short period of time. The second execution should use the result from the cache of first execution, but does not and executes the method a second time.

[WebMethod( CacheDuration=600 )]
public string CacheTest()
{
StringBuilder sb = new StringBuilder( "Method executed at " );
sb.Append(System.DateTime.Now.ToString());
return( sb.ToString() );
}

Result 1.....

<?xml version="1.0" encoding="utf-8" ?>
<string xmlns="http://tempuri.org/">Method executed at 29/07/2004 23:16:05</string>

Result 2 ... just 2 seconds later

<?xml version="1.0" encoding="utf-8" ?>
<string xmlns="http://tempuri.org/">Method executed at 29/07/2004 23:16:07</string>
Re: Problem with output caching Jeffrey Hasan
8/3/2004 12:37:33 AM
My understanding was that output caching only works in Web services if the
Web service is compiled stand-alone, rather than together with a client.
Make sure that they are compiled separately and then test your scenario
again.

Jeffrey Hasan, MCSD
President, Bluestone Partners, Inc.
-----------------------------------------------
Author of: Expert SOA in C# Using WSE 2.0 (APress, 2004)
http://www.bluestonepartners.com/soa.aspx

[quoted text, click to view]
below and calling twice within a short period of time. The second execution
should use the result from the cache of first execution, but does not and
executes the method a second time.
[quoted text, click to view]

Re: Problem with output caching Jack
8/3/2004 3:43:02 AM
OK, it does work with a seperate client...
The MS KB article http://support.microsoft.com/default.aspx?scid=kb;en-us;318299 describes testing the caching from the test page that is generated by the web service and this does not work. I would like MSoft to correct the article.

Thanks for your help...

[quoted text, click to view]
Re: Problem with output caching Glenn Michael
11/27/2006 5:50:02 AM
Thanks for your response but I need some help here.
Do I need to move the webservice to another project or another virtual
directory to have it compile separetly? Where are the project dlls stored in
v2?
Glenn Michael
AddThis Social Bookmark Button