1

I am trying to run the Cassia library on a remote Windows Server 2008 Terminal Server. Any methods I call I get the response below.

No more data is available

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.ComponentModel.Win32Exception: No more data is available

Stack Trace: 

[Win32Exception (0x80004005): No more data is available]
   Cassia.Impl.NativeMethodsHelper.GetSessionInfos(ITerminalServerHandle server) +159
   Cassia.Impl.TerminalServer.GetSessions() +103
the Tin Man
  • 158,662
  • 42
  • 215
  • 303
CoderK
  • 53
  • 7

1 Answers1

0

I was getting this error as well. Turns out that if there are no sessions for the given server it throws this exception.

Try running qwinsta /server <servername> in a WCP shell. It should return "No session exists for *".

I worked around this by checking exception message for "no more data" and don't throw it if so. It's gross but it's an open source dll.

SchmitzIT
  • 9,227
  • 9
  • 65
  • 92