P
P
Petez2015-09-12 05:33:16
Programming
Petez, 2015-09-12 05:33:16

How to determine the beginning of the opening of the rdp session?

The task is the following, it is necessary at the moment or probably better before the opening of the rdp session, on the server side, run your own program, which in turn will decide whether or not to open the rdp connection.
Tell me in what way this can be implemented, which libraries (I found that mstsclib and wtsapi32 are used for connection) need to be used. I will write the program in c#, so maybe there are some built-in mechanisms in .net. If someone has done something similar and has examples, I would be very grateful. Maybe just poke where to dig)

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Armenian Radio, 2015-09-12
@gbg

In the terminal server settings there is an item where you can specify what will be used instead of the shell (explorer) in the terminal session. If this something closes itself immediately after launch, the session will end.

I
Ivan Arxont, 2015-09-12
@arxont

Offhand, there are several ways -
1) Parse server logs
2) Put in autoload (in the terminal access settings there is an option "Run at opening") a program that, by the name of the connecting computer (or by its address, or by username) will do the programmed actions. (Here, for example, getting the name of the computer that connected - pastebin.com/bLejYpzs )
PS: IMHO you have the wrong approach architecturally - the rdp mechanism already has a mechanism that decides whether or not to create a connection :) Authentication is called. Well, the built-in windows firewall allows you to specify which computers can connect.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question