Earlier this week I was doing an upgrade of our Team Foundation Server 2013 instance to Update 2. The database and the application tier are installed on the same machine. The installation piece went through without any issue. However when I started the configuration part, in the Update section of the TFS administration console, the application kept hanging on the “Database” screen. It would display the configuration database in the list box, but then just hang.
On looking at the event viewer logs, there were two errors in the “Application Logs” sections (as shown below)
The .NET Runtime error logs provided further clues as to what could be wrong. On opening it I could see the stack trace that linked to a SQL connectivity issue. This seemed odd because I was doing an in-place upgrade and the existing TFS instance was not having any issues with database connectivity (before the update 2 was installed!).
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.AccessViolationException
at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(System.Data.ProviderBase.TimeoutTimer, System.Data.SqlClient.SqlConnectionString, System.Data.SqlClient.SqlCredential, System.String, System.Security.SecureString, Boolean)
at System.Data.SqlClient.SqlInternalConnectionTds..ctor(System.Data.ProviderBase.DbConnectionPoolIdentity, System.Data.SqlClient.SqlConnectionString, System.Data.SqlClient.SqlCredential, System.Object, System.String, System.Security.SecureString, Boolean, System.Data.SqlClient.SqlConnectionString, System.Data.SqlClient.SessionData)
at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(System.Data.Common.DbConnectionOptions, System.Data.Common.DbConnectionPoolKey, System.Object, System.Data.ProviderBase.DbConnectionPool, System.Data.Common.DbConnection, System.Data.Common.DbConnectionOptions)
at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(System.Data.ProviderBase.DbConnectionPool, System.Data.Common.DbConnection, System.Data.Common.DbConnectionOptions, System.Data.Common.DbConnectionPoolKey, System.Data.Common.DbConnectionOptions)
On doing some more online searches it turns out that the above SQL error is caused because of .NET 4.5.1. More details of this issue seen in this KB article from Microsoft at http://support.microsoft.com/kb/2915689 (example 3 is close to the error we see in the event viewer). As suggested in the “Resolution” section, I went ahead and installed Microsoft .NET Framework 4.5.2 from http://support.microsoft.com/kb/2901954.
After restarting the machine I was able to successfully go ahead and connect to the databases and finish the upgrade to TFS 2013 Update 2.