Jump to content

Recommended Posts

Posted (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 by mobybrick
Posted
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.
Posted

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

Posted

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

  • 1 year later...
Posted

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

Posted

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

Posted

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...