Is there a way to retrieve the calling application name in a wcf service?
+1
A:
The ServiceSecurityContext would be the place to start, but I'd be very surprised if such a thing exists.
If you require this by your client think about adding message headers and force them to insert a client application name, or - if you don't trust anybody - give them separate certificates and use them to find out "who" is calling you.
Marc Wittke
2009-10-19 11:45:07
Agree with @Marc, the nearest you're going to get is either a) arbitrary user supplied string like AppName b) mandatory credential e.g. an AppID, Cert, Token or other evidence to identify the caller - doesn't necessarily have to be a cert, I'd suggest that should ensure that you validate that you issued or trusted the evidence originally. e.g. a lookup into a db of issued tokens, or validating a cert root.
stephbu
2009-10-19 12:00:17