How to detect it is a remote session at server side?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Harshan
    New Member
    • Oct 2007
    • 1

    How to detect it is a remote session at server side?

    I wonder that if there is a way to detect from with a C# app if it is
    being started in a remote session? i.e. someone has connected via remote
    desktop or terminal services.
    and also Logged out of remote desktop session, indication in C#
  • Plater
    Recognized Expert Expert
    • Apr 2007
    • 7872

    #2
    Yes. I don't remember offhand exactly though.
    I think you can find something in Environment.Get EnvironmentVari ables( )

    But I was pretty sure there was some direct like isRemoteSession boolean property somewhere. Cannot seem to find it now though.

    EDIT:
    Found it:
    SystemInformati on.TerminalServ erSession

    Comment

    Working...