Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to test a remoting connection (check state)

I have an object created in a host application and can access it remotely using remoting, is there any way I can test the connection to ensure it is still "alive"? Maybe an event I can use that fires if the remoting connection gets disconnected, or some property that can tell me the state of the remoting connection. Is there something like this available?

like image 371
Jeremy Avatar asked Nov 13 '08 17:11

Jeremy


People also ask

How do I audit Remote Desktop Connection?

Navigate to Computer Configuration -> Windows Settings -> Security Settings -> Advanced Audit Policy Configuration -> Audit Policies -> Logon Logoff access. Under Audit Policy, select 'Audit Logon' and turn auditing on for success.

How do I check PowerShell RDP status?

The Process to Get RDP Sessions With PowerShell and QWINSTA Run QWINSTA to extract the session information. If a session exists, read the username and session type. Log the username and session type to a variable.

How do I check my CredSSP status?

Summary: Use a Windows PowerShell cmdlet to check on status of CredSSP delegation. How can I determine the status of credential delegation (CredSSP) on my computer? The machine is not configured to allow delegating fresh credentials.


1 Answers

I generally add another method to the remoting server MarshallByRef class, (I generally name it Ping(), as in:

 public void Ping() {} 

that does nothing, and returns nothing.. Then to "test" my connection, I call this method... If it throws a System.Net.Sockets.Exception, I have lost the connection....

like image 102
Charles Bretana Avatar answered Sep 29 '22 19:09

Charles Bretana