How can c# service get the identity (logon name) of a terminal server user that calls it?
I wrote a c# service that listens for http request and return the current logon user. The request is initialized by a javascript that runs in the browser. That worked well so far, but it doesn't work on terminal server where there can be multiple users that are connected simultaneously. What I'm currently doing is query for the processId of "explorer" and then use "GetOwner" to get the user logon name.
Is there a way for the service to identify the user that generated the http request for it? Can I somehow get the http session and identify the user that owns it? I need to return as response the user identity.
Thanks, JJ