Comments (10)
I have the exact same issue on a 2003 Terminal Server. Currently I just keep
retrying the connection until it works. This server is normally under a small
load
with 5-15 connections on it most of the time.
Original comment by [email protected]
on 8 Mar 2010 at 3:27
from cassia.
Oops, I thought that this issue had been replied to -- sorry for the late
response!
This issue should be fixed for Server 2003 on trunk. The trunk is quite
stable, so if you'd like, you can grab the latest build from the build server
(http://teamcity.codebetter.com/project.html?projectId=project51 -- use the
artifacts
link) and give it a shot.
Original comment by danports
on 8 Mar 2010 at 3:49
- Added labels: Milestone-2.1
from cassia.
I was using the dll from your link and still had the error. Am I using the
code
incorectly? Below is the function I am using:
Public Sub TSLogins()
ListView1.Items.Clear()
Dim strTSADMIN As ITerminalServicesManager = New TerminalServicesManager
Dim strTSServer As ITerminalServer = strTSADMIN.GetRemoteServer("\\server03")
Dim strTSSession As ITerminalServicesSession
Dim strTSInfo As String = ""
Dim strTSTotal As String = ""
Dim strTSState As String = ""
strTSServer.Open()
Dim strCounter As Integer = 0
Dim item1 As New ListViewItem
Try
For Each strTSSession In strTSServer.GetSessions '*****Here is where I
get the error******************
strTSState = ""
If strTSSession.UserName.Trim.ToString <> "" Then
strCounter = strCounter + 1
item1 = New ListViewItem
item1.Text = GetUserInfo(strTSSession.UserName)
item1.SubItems.Add(strTSSession.UserName)
item1.SubItems.Add(strTSSession.LoginTime.ToString)
ListView1.Items.Add(item1)
strTSInfo = "User: " & strTSSession.UserName & " Logon
Time: " & strTSSession.LoginTime.ToString & " State: " &
strTSSession.ConnectionState & " Session ID: " & strTSSession.SessionId
strTSTotal = strTSTotal & strTSInfo & vbCrLf
End If
Next
strTSServer.Close()
strTSServer.Dispose()
Catch ex As Exception
strTSServer.Close()
strTSServer.Dispose()
Application.DoEvents()
'System.Threading.Thread.Sleep(100)
TSLogins()
End Try
Label2.Text = strCounter
End Sub
Original comment by [email protected]
on 11 Mar 2010 at 7:14
from cassia.
Is it the "Not a valid FileTime" exception you are getting, or a different one?
You
said server03 is running Windows Server 2003? What version of Windows is the
computer
executing the code running?
Original comment by danports
on 14 Mar 2010 at 4:19
from cassia.
I tried to reproduce the error today, and of course I was not able to. The
error is
totally random and I have not been able to find what's causing it. The error I
was
getting is "Not a valid Win32 FileTime". The application is normally run
directly
on the a terminal server (2003). That is also the same server that I am
gathering
information about with the dll. I am developing the application on an XP SP3
machine and have gotten this error with both machines.
Original comment by [email protected]
on 15 Mar 2010 at 6:00
from cassia.
Here is the stack trace if this helps. I was just able to reproduce the error.
I
did try a few other times this morning and could not reproduce it.
{"Not a valid Win32 FileTime.
Parameter name: fileTime"}
at System.DateTime.FromFileTimeUtc(Int64 fileTime)
at System.DateTime.FromFileTime(Int64 fileTime)
at Cassia.Impl.NativeMethodsHelper.FileTimeToDateTime(FILETIME ft)
at Cassia.Impl.TerminalServicesSession..ctor(ITerminalServer server, Int32
sessionId, String windowStationName, ConnectionState connectionState)
at Cassia.Impl.TerminalServicesSession..ctor(ITerminalServer server,
WTS_SESSION_INFO sessionInfo)
at Cassia.Impl.TerminalServer.GetSessions()
at WindowsApplication1.Form1.TSLogins() in C:\Temp\practicevb\vb2005\Clone
Metrics\Clone Metrics\Form1.vb:line 220
at WindowsApplication1.Form1.Form1_Load(Object sender, EventArgs e) in
C:\Temp\practicevb\vb2005\Clone Metrics\Clone Metrics\Form1.vb:line 21
at System.EventHandler.Invoke(Object sender, EventArgs e)
at System.Windows.Forms.Form.OnLoad(EventArgs e)
at System.Windows.Forms.Form.OnCreateControl()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.WmShowWindow(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ContainerControl.WndProc(Message& m)
at System.Windows.Forms.Form.WmShowWindow(Message& m)
at System.Windows.Forms.Form.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg,
IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.SafeNativeMethods.ShowWindow(HandleRef hWnd, Int32
nCmdShow)
at System.Windows.Forms.Control.SetVisibleCore(Boolean value)
at System.Windows.Forms.Form.SetVisibleCore(Boolean value)
at System.Windows.Forms.Control.set_Visible(Boolean value)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32
reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason,
ApplicationContext context)
at System.Windows.Forms.Application.Run(ApplicationContext context)
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
at
Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicat
ionMo
del()
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run
(String[] commandLine)
at WindowsApplication1.My.MyApplication.Main(String[] Args) in 17d14f5c-a337-4978-
8281-53493378c1071.vb:line 81
at System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence
assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext,
ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
Original comment by [email protected]
on 15 Mar 2010 at 9:31
from cassia.
Thanks for looking into this. Based on that stack trace, it looks like you are
running
the 2.0 release (2.0.0.60). Could you check the exact version of the assembly
you are
using? The latest trunk build is 2.1.0.93, and it should not have this problem
-- not
with that stack trace, anyways.
Original comment by danports
on 16 Mar 2010 at 12:50
from cassia.
Sheesh! I thought I did that, but I did not see that it extrated the dll in
/bin.
Anyway you are correct and I was using the old ver. I just startet to use the
new
version. Thanks so much for the help.
Original comment by [email protected]
on 16 Mar 2010 at 5:03
from cassia.
No problem. I am going to close this issue unless scriptolog has anything to
say about
it.
Original comment by danports
on 16 Mar 2010 at 5:50
- Changed state: Verified
from cassia.
I've downloaded the beta build and didn't encounter the error again, though I
didn't
test it extensively. You can close the thread. Thanks!
Original comment by [email protected]
on 17 Mar 2010 at 10:18
from cassia.
Related Issues (20)
- TerminalServicesSession.RemoteEndPoint fails on Windows 8/Server 2012+ HOT 3
- session.applicationname throws "parameter incorrect" when no application listed HOT 1
- feature request or just info HOT 3
- cannot use the Stop-TSSesion -force on disconnected session HOT 1
- No more data is available HOT 6
- The system cannot find the file specified HOT 1
- Method to set RD server drain mode
- Add a property to ITerminalServicesSession to fetch the session's virtual IP address HOT 1
- Login To RemoteServer HOT 1
- Issues running on and connecting to W8 / Server 2012 systems: HOT 1
- Cassia is not strong named HOT 1
- rpc server unavailable error HOT 1
- Documentation does not display HOT 1
- Add Support to Get the external remote client IP HOT 1
- Set a command for reconnect HOT 3
- Not able to send message to remote terminal session. HOT 2
- Need 64 Bit Version HOT 1
- Documentation is empty HOT 1
- Access Denied error only when trying to log off a user HOT 4
- Update the Nuget package to 2.1 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cassia.