mobybrick Posted August 2, 2013 Posted August 2, 2013 (edited) Hi Nick, Two issues in the current logon tracker: 1. If the -silent switch is NOT used for group policy deployment, i.e. logon/logoff/startup/shutdown scripts e.g. "HAP Logon Tracker.exe" http://fqdn.local/HAP/ then the logon tracker does operate correctly for logon scripts - although this might be an issue with the scripts asyc setting (currently at default). The bigger problem is 2. If a student logs on for a second time, they have the option to log themselves off the other computer. This feature does not work. When a student on a second computer tries to log themselves off a first computer, the first computer initiates a logoff on the second one, but this fails. The desktop dissappears, but HAP re-appears (before the windows logon screen ever gets a chance to re-appear) and won't allow the logoff. The message is logged in the eventvwr: An error occurred in the Logon Tracker Error: System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.Data.SqlClient.SqlException: Cannot insert the value NULL into column 'logonserver', table 'haptrack.dbo.TrackerEvents'; column does not allow nulls. INSERT fails. The statement has been terminated. at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning() at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) at System.Data.SqlClient.SqlDataReader.ConsumeMetaData() at System.Data.SqlClient.SqlDataReader.get_MetaData() at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior) at System.Data.Linq.SqlClient.SqlProvider.Execute(Expression query, QueryInfo queryInfo, IObjectReaderFactory factory, Object[] parentArgs, Object[] userArgs, ICompiledSubQuery[] subQueries, Object lastResult) at System.Data.Linq.SqlClient.SqlProvider.ExecuteAll(Expression query, QueryInfo[] queryInfos, IObjectReaderFactory factory, Object[] userArguments, ICompiledSubQuery[] subQueries) at System.Data.Linq.SqlClient.SqlProvider.System.Data.Linq.Provider.IProvider.Execute(Expression query) at System.Data.Linq.ChangeDirector.StandardChangeDirector.DynamicInsert(TrackedObject item) at System.Data.Linq.ChangeDirector.StandardChangeDirector.Insert(TrackedObject item) at System.Data.Linq.ChangeProcessor.SubmitChanges(ConflictMode failureMode) at System.Data.Linq.DataContext.SubmitChanges(ConflictMode failureMode) at HAP.Data.SQL.Tracker.Logon(String Username, String Computer, String DomainName, String IP, String LogonServer, String OS) at HAP.Web.Tracker.api.Logon(String Username, String Computer, String DomainName, String IP, String LogonServer, String os) --- End of inner exception stack trace --- It appears to be a problem due to the .SQL file that sets up the tracker database - it requires the 'logonserver' column to allow NULLS. However, if we set this to allow NULLS, then people are never shows as being logged off when they logoff usually, or when a PC starts. Any thoughts? Thanks Moby Edited August 2, 2013 by mobybrick
nickbro Posted August 7, 2013 Posted August 7, 2013 Looks like it's not putting the correct information into the database. It should not be putting NULLs into the database. You should always be able to get what logon server the user has logged onto.
mobybrick Posted August 7, 2013 Author Posted August 7, 2013 Hi Nick, There's not a problem getting the logon server info - The copy of HAP that runs at logoff tries to write NULL or has a problem This causes a) Logoffs and shutdown take a very long time because the client abends, b) Students aren't registered as being logged off and c) Attempts by students to remotely log themselves off (when logging in on another computer) fail. What would you like me to do to test? It looks broken!! Thanks, Moby
nickbro Posted August 7, 2013 Posted August 7, 2013 Very odd, it doesn't do this on my site, are you using https in the address? This is the code that gets run on Logoff/Shutdown/Startup: sql2linqDataContext sdc = new sql2linqDataContext(ConfigurationManager.ConnectionStrings[hapConfig.Current.Tracker.Provider].ConnectionString); foreach (TrackerEvent te in sdc.TrackerEvents.Where(t => t.ComputerName == Computer && t.domainname == DomainName && !t.LogoffDateTime.HasValue)) te.LogoffDateTime = DateTime.Now; sdc.SubmitChanges(); Basically, it looks tracker events where the computer name and domain name exist and there is a logon recorded with no log off, it then sets the logoff time to now. It doesn't go anywhere near the logon server
mobybrick Posted August 9, 2013 Author Posted August 9, 2013 Hi, Yes, am using https - although I am using the internal name of the server, e.g. https://localname.local/HAP/ ~ should that make any difference? Something is broken here on fresh install - using SQL database. Regards Moby
TomClay Posted December 10, 2014 Posted December 10, 2014 Morning Folks, I'm loving HAP+ and the tracker however, I would like to make the logon and logoff tracker run silently. I have tried adding "-silent" to the end of the parameters but the window still pops up. The way this thread starts "If the -silent switch is NOT used for group policy.." would imply that there is a silent switch. If so, could I get a copy of the parameters so I know I'm typing it correct. If there isn't currently a silent switch is there another way I can make it silent or window-less? Thanks, Tom
nickbro Posted December 10, 2014 Posted December 10, 2014 try putting the /silent before the url? or /silent, I can't remember how I set that one
TomClay Posted December 11, 2014 Posted December 11, 2014 Sorry Nick, no joy. These all come up with a URI error: HAP Logon Tracker.exe /logon /silent https://etc/ HAP Logon Tracker.exe /logon /silent, https://etc/ HAP Logon Tracker.exe /silent /logon https://etc/ HAP Logon Tracker.exe /silent, /logon https://etc/ And with /silent on the end it continues to pop up with the logon tracker icon with "Registering..." I have also noticed that each logon leaves an instance of hap logon tracker notifier.exe running. Thanks for your support. Tom
nickbro Posted December 11, 2014 Posted December 11, 2014 The notifier is by design, it will prompt them if their username logs on else where I've attached a version of the tracker which seems to work correctlyHAP Logon Tracker Installer.zip 1
TomClay Posted December 11, 2014 Posted December 11, 2014 Thanks Nick, With the new version of the file i got the silent command working like so: "C:\Windows\SysWOW64\HAP Logon Tracker.exe" Logon https://etc/HAP/ , /silent It pops up with the window title but no information. Hopefully I can roll this out to an ICT room now and see how it goes. Thank you again, Tom
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now