views:

159

answers:

0

I am planning on using the CacheDuration Attribute with my WebMethods. I have the webmethod code wrapped in a try/catch and the exceptions are logged to the database. after handling the exception, i return the error message in the response object (lets call it ABCResponseInfo), so the calling client can know about the error. this instance of ABCResponseInfo goes back with just the error message and all other data members set to null.

i am assuming that this ABCResponseInfo instance with the error state is Cached and if the calling client retries, the same ABCResponseInfo is returned, if the subsequent call comes in, within the next CacheDuration seconds.

is there some way to avoid this from happening? i am thinking, rethrowing the exception to the client is one possible way.. but i am not convinced that its the only way to handle this situation.

any other ideas?