You Are Here
Inside of a service method, how do I know where the message was delivered?
Without defining what distinguishes a location it's hard to explain where 'here' is. I've got a few guesses though based on the most common variations of this question:
- OperationContext.Current.IncomingMessageHeaders.To
OperationContext.Current.IncomingMessageProperties.Via
- HostingEnvironment.ApplicationVirtualPath
- Assembly.GetExecutingAssembly().Location
- HostingEnvironment.ApplicationPhysicalPath
Next time: Serialization Temporary Assemblies