I'm trying to get the SQL Tracker working, but running into a problem. Everytime I try and set up the tracker to use SQL it returns with an error that it failed to login to the SQL database using my domain admin credentials, it's a bit strange because I have set it up to use the IIS APPPOOL\HAP account but it still tries to connect using the domain admin account. Is there anywhere I might have set up some connection to the SQL somewhere using my domain admin account by accident.
My SQL Connection String is as follows.
<add name="SQLConnectionString" connectionString="Server=localhost;Database=hap;Trusted_Connection=True;" />
You can always try a different connection string where is uses a specific user:
SQL Server 2012 Connection String Samples - ConnectionStrings.com
Cheers nick, I'll give that a try.
Tried that, I get this error message.
Server Error in '/HAP' Application.
Login failed for user 'norden2000\administrator'.
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.Data.SqlClient.SqlException: Login failed for user 'norden2000\administrator'.
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
[SqlException (0x80131904): Login failed for user 'norden2000\administrator'.]
System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +6277312
System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +1363
System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK) +53
System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(ServerInfo serverInfo, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, TimeoutTimer timeout) +6292062
System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, TimeoutTimer timeout, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) +6291977
System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +352
System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) +831
System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +49
System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) +6293782
System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) +78
System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +1922
System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +89
System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +6296606
System.Data.Linq.DataContext.SubmitChanges(ConflictMode failureMode) +952
HAP.Web.Login.login_Click(Object sender, EventArgs e) +623
System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument) +155
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3691
Forget it, fixed the sql connection bit, turns out I have SQL 2008 and SQL 2008 R2 Express installed on my server, don't know why, i'll have to figure out why and sort it out, once I corrected the server address it worked fine. However, I don't seem to be getting any information on the web logs page, how do I get information on there?
Final update I think, I can track the data by clicking on the month, so December 2012, then by clicking on view data shows logons, but there is no data on the chart, it doesn't even show up.
Does the chart show? I had that issue, had to update the scripts it uses. There's a thread on here somewhere.
The chart doesn't show, I remember seeing the thread yesterday somewhere with a zip file called scripts attached, i'll give that a try, thanks.
@Edu-IT Thanks for that, I don't know which script sorted it, but there was about 5 or 6 that were different but they have sorted out the chart problem on the web logs.
I still don't get any data on the live logon or historic logs tabs though, but i'll look at the scripts and see what is wrong with that.