tags:

views:

9

answers:

1

Is there a way that I can retrieve the timestamp of a web service call? I'm trying to get the time of the server hosting the web service.

A: 

Easiest thing to do is to just log them in the server implementation of your service contract, you can use PostSharp to make some attributes to take of this aspect.

For instance, you can write a Trace attribute which simply logs a debug message when a method is invoke. Here's one I wrote a while back which tracks how long a method takes and log a warning message if it takes longer than a set threshold:

http://theburningmonk.com/2010/03/aop-method-execution-time-watcher-with-postsharp/

I came across some 'trace' attribute example before, if you want I can look for it for ya.

theburningmonk