开发者

Timestamp of server from a web service call

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


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜