Accessing Remote Clients issue.

160 views
Skip to first unread message

Mathew Stacy

unread,
Jun 13, 2011, 2:01:56 PM6/13/11
to Cassia Users
I'll give a little background just so that my issue can be better
understood, I am writing a GUI for an existing program called Relay
TCP. The program is a port forwarding program that we use to allow
users to log into their local desktops via a terminal server.

One of the functionalities I would like to add to this is the ability
to see if a user is logged into a client.

I have written the code and it works fine if I am attempting to look
at a terminal server, but will not allow me to see the connection
state of a workstation. It will also work fine if I am attempting to
look at a workstation using the getlocal() function. This leads me to
believe the functionality exists. It does not appear to be a
permissions issue… I am a domain admin and all the computers are on
the same domain. It also doe not appear to be a firewall issue as I
have attempted this with the firewall disabled.

I am able to open the connection, but I get an “Access Denied” error
when my code tries to access any properties of a remote workstation.

Any ideas?

Dan Ports

unread,
Jun 13, 2011, 9:04:45 PM6/13/11
to cassia...@googlegroups.com
Mathew,

Just to clarify: you're trying to invoke .GetRemoteServer(some XP/Vista/7 machine).GetSessions() and you're getting an access denied error, right?

On client versions of Windows, this is often caused by the AllowRemoteRPC registry entry not being set appropriately. Windows XP will require a reboot for changes to that registry key to be effective; Vista and 7 should not.

Does that help?

Dan


--
You received this message because you are subscribed to the Google Groups "Cassia Users" group.
To post to this group, send email to cassia...@googlegroups.com.
To unsubscribe from this group, send email to cassia-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/cassia-users?hl=en.


Mathew Stacy

unread,
Jun 14, 2011, 9:22:30 AM6/14/11
to Cassia Users
This took care of it... I have tested a Windows XP client and it can
now see the session properties. Thanks for that. I had started to
think this may just be a limitation, since I noticed that Qwinsta, and
terminal services manager were not able to get this information
either. Now they can all access the info.

Have you noticed that if a local user is logged into the machine you
get some inconsistent data? It seems some of the properties report
correctly and some report incorrectly.

I am trying to figure out if there is a way to determine whether the
user is logged in locally, or remote using any of the available data.
If this isn't something you have already determined... I'll figure out
if it's possible. It may be a limitation in the Remote Desktop
Services API.

Thanks,

On Jun 13, 9:04 pm, Dan Ports <danpo...@gmail.com> wrote:
> Mathew,
>
> Just to clarify: you're trying to invoke .GetRemoteServer(some XP/Vista/7
> machine).GetSessions() and you're getting an access denied error, right?
>
> On client versions of Windows, this is often caused by the AllowRemoteRPC
> registry entry<http://technet.microsoft.com/en-us/library/ff710472(WS.10).aspx>not
> being set appropriately. Windows XP will require a reboot for changes
> to
> that registry key to be effective; Vista and 7 should not.
>
> Does that help?
>
> Dan
>

Dan Ports

unread,
Jun 15, 2011, 9:15:42 AM6/15/11
to cassia...@googlegroups.com
On Tue, Jun 14, 2011 at 9:22 AM, Mathew Stacy <mathew...@gmail.com> wrote:
This took care of it... I have tested a Windows XP client and it can
now see the session properties.  Thanks for that.  I had started to
think this may just be a limitation, since I noticed that Qwinsta, and
terminal services manager were not able to get this information
either.  Now they can all access the info.

Great.
 

Have you noticed that if a local user is logged into the machine you
get some inconsistent data?  It seems some of the properties report
correctly and some report incorrectly.

Yes, the idle time is often not reported correctly for the console session (see issue 23), though I'm not sure that there's anything that can be done about that -- it may just be a limitation or bug in the underlying Windows API. Are there other properties you're seeing being reported incorrectly?


I am trying to figure out if there is a way to determine whether the
user is logged in locally, or remote using any of the available data.
If this isn't something you have already determined... I'll figure out
if it's possible.  It may be a limitation in the Remote Desktop
Services API.

See ITerminalServicesSession.ClientProtocolType.

Ajay Kashyap

unread,
Feb 7, 2019, 3:09:38 PM2/7/19
to Cassia Users
Hi, 
I am getting error only on production server when using session.disconnect();

System.ComponentModel.Win32Exception (0x80004005): Access is denied
   at Cassia.Impl.NativeMethodsHelper.DisconnectSession(ITerminalServerHandle server, Int32 sessionId, Boolean wait)
   at Cassia.Impl.TerminalServicesSession.Disconnect(Boolean synchronous)
   at Cassia.Impl.TerminalServicesSession.Disconnect()
   at RadiusClient.RadiusService.<Authenticate>d__8.MoveNext()

Please help me


Regards,
Ajay
Reply all
Reply to author
Forward
0 new messages