468,247 Members | 1,431 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,247 developers. It's quick & easy.

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#
Feb 6 '10 #1
1 2407
Plater
7,872 Expert 4TB
Yes. I don't remember offhand exactly though.
I think you can find something in Environment.GetEnvironmentVariables( )

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

EDIT:
Found it:
SystemInformation.TerminalServerSession
Feb 8 '10 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

9 posts views Thread by Etienne Charland | last post: by
1 post views Thread by Graham | last post: by
3 posts views Thread by Lord2702 | last post: by
7 posts views Thread by Chris | last post: by
6 posts views Thread by John Blair | last post: by
9 posts views Thread by Tim | last post: by
2 posts views Thread by =?Utf-8?B?QWxoYW1icmEgRWlkb3MgS2lxdWVuZXQ=?= | last post: by
18 posts views Thread by sebastian | last post: by
4 posts views Thread by goscottie | last post: by
reply views Thread by kermitthefrogpy | last post: by
reply views Thread by zattat | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.