I had a great time presenting at the Appleton event last week - everyone had great questions and we also had some good dialogue around n-tier application design and web service management. Of course, with all the questions, I faced a few that I could not immediately answer, so I am once again using my blog to shed light on some audience curiosities.

Q. Tell us more about the CacheDuration property of the WebMethod attribute in ASP.NET. Where is the data cached and is it validated for potential updates to the underlying data source?

A. The CacheDuration defines how long a web method response is cached on the server. Note that this data is stored in memory, so you want to reserve this functionality for web methods with one or few request possibilities and small responses. See this article for more information. I also found out that CacheDuration simply caches the output XML from the web service, so changes to the underlying data can render the cached data obsolete.  If supplying data that may be several seconds delayed does not meet your requirements, you'll want to explore the ASP.NET Cache object or, for even more functionality, check out the Enterprise Library Caching Application Block

Q. With all of the new code options in SQL Server 2005 (integrated CLR, http endpoints, etc), there would seem to be increased opportunity for something to go wrong and, in turn, have a negative impact on other aspects of the database server. How will these new features be managed from a system resource perspective?

A. There are two security guardians that will be at work in SQL Server 2005.  First, SQL Server will of course continue to manage authentication and authorization on the database and associated activities.  On top of this now, you will also see the security from the .NET Common Language Runtime (CLR) further managing any .NET-based resources (e.g. .NET user-defined functions and stored procedures).  This will create two distinct layers of security and reliability on your database server.

Special thanks to Bernard Wong and Geoff Snowman for helping me to answer these questions.