I am using Cassia to connect my C# code to our network of terminal servers. If I run the program as an Administrator user it works fine. However when I load the same code up as a service with the Local System user and Cassia makes a WTSEnumerateSessions
call I get a Win32Exception
(0x80004005) "No more data is available".
From this issue on the Cassia tracker I saw it can be a permissions issue. So on the remote server I am querying I set "Full Control" permissions for the computer account of the machine I am connecting from but it did not fix the issue.
Does anyone have any other suggestions other than running the service under a user account that has Administrative privileges instead of under the Local System account?