OK, it does work with a seperate client...
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.
"Jeffrey Hasan" wrote:
> 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 >
> "Jack" <Jack@discussions.microsoft.com> wrote in message
> news:BC44EEC4-F68B-4014-B5F1-18EAA7C06953@microsoft.com...
> > 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>
> >
>
>