Coder Social home page Coder Social logo

Comments (10)

GoogleCodeExporter avatar GoogleCodeExporter commented on July 21, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 21, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 21, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 21, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 21, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 21, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 21, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 21, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 21, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 21, 2024
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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.