Click here to Skip to main content
15,887,135 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I have created windows form application in vb.net. I want to detect, user is remotely access application or locally access.

There are a lot of remote/third party application like teamviewer, citrix, webex, remote desktop connection, ammy admin etc.

So, I have to identify the user(local/remote).

please help.

Thanks,

Saurav Sinha

What I have tried:

VB
Dim blnUser As Boolean = SystemInformation.TerminalServerSession

        If blnUser = True Then
            MsgBox("user is remotely accessed")
        Else
            MsgBox("user is locally accessed")
        End If
Posted
Updated 1-Jul-18 2:32am
v2
Comments
Richard MacCutchan 29-Jun-18 8:52am    
Help how, what is the problem?
yash1507 29-Jun-18 9:08am    
This is working fine with RDC(Remote Desktop Connection, Citrix) but, when i accessed program via teamviewer it's treated teamviewer as local user. Program should be treated teamviewer user as remote user.

I want if some body outside local system try to access program it will tell that user is accessed remotely.

Please provide vb.net code regarding other remote access tools e.g. teamviewer.

Thanks

1 solution

Not all software use the same technique to create connection... So there is no single solution for all...
RDP and Citrix built on the Windows networking so TerminalServerSession will be set...
TeamView works differently and for that you have to go to the product web site and look for development resources... In the case of TeamView there is an TerminalServerSession that may help...
For all the other connection software you want to support, you have to look up some similar API...
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900