views:

26

answers:

1

Using a process identifier, I can get the user identifier. Indeed, if the process is executed in the user environment, I can get the user session id...

But how can I derive a Windows session ID by only user name? (Of course, if the user is not logged, no session id can be derived).


My situation is the following:

I have a service (system service), which it has a communication channel with a UI application running on the user desktop. The desktop application, using ProcessIdToSessionId, is able to communicate the desktop session identifier to the service, in order to execute processes directly from the service in the user desktop (using user credentials).

The goal I want to achieve is derive the session identifier (required for running application from a system service) without having to communicate with the desktop application.

In other words, is it possible to assert the session identifier with the user name?

A: 

Hi, can you expand your question just a bit? Are you looking for session as part or an asp.net app or winforms?

Kefala