Contains notes and lessons in working technology, especially .NET, Azure, DevOps, Agile, and Team Foundation Server.

Thursday, September 1, 2011

IIS 7 and Remote Debugging in .NET (Finding the App Pool Thread ID)

Today I had some fun doing remote debugging on an IIS 7 box running a .NET WCF service and wanted to note a couple of things.  First, you must install the linked download on the server.  Second, make sure your firewall ports are off for remote debugging (or just stop Windows Firewall completely).  And last, you’ll need to know the thread ID of the w3wp.exe process (if you have multiple web sites/apps running on the server).  You can find this by running:

c:\windows\system32\inetsrv\appcmd.exe list wps

It will nicely output the process, thread ID, and application pool name.

WP "756" (applicationPool:DefaultAppPool)

Saturday, July 2, 2011

BRD Lite Rangers HOL–Web deployment task failed

Going through the HOL Lab for the BRD Lite Team Build process template, I received the error “Web deployment task failed” after changing the connection string to remove the ‘sqlExpress’ instance.  Yet it still failed, even when I changed it to run under the Admin account.  After turning on the Diagnostic detail, it turned out to be a different project issue:

image

This was because I had to change the connection string in the web project properties under the Package/Publish SQL tab.  Once I removed the ‘sqlexpress’ value from the Data Source, my build succeeded.

image

Monday, May 23, 2011

TFS 2010 SP1 Installation Issue–TFS_SCHEMA_VERSION

I just completed applying TFS SP1 our production TFS server.  The installation experience was smooth, but I ran into one problem that caused some minor panic and about an hour of research.  The install succeeded, the server restarted, but the TFS Job would not start up, and when trying to connect to TFS via Visual Studio, it threw an error about a mismatch of TFS versions in the database.  In the error log, the following was being logged:

TF53010: The following error has occurred in a Team Foundation component or extension:
Date (UTC): 23/05/2011 23:59:18
Machine: --removed--
Application Domain: TfsJobAgent.exe
Assembly: Microsoft.TeamFoundation.Framework.Server, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a; v2.0.50727
Service Host: 16ff6530-41b7-4803-8474-7ff80ca3c33f (--removed--)
Process Details:
  Process Name: TFSJobAgent
  Process Id: 2056
  Thread Id: 1584
  Account name: --removed--

Detailed Message: There was an error during job agent execution. The operation will be retried. Similar errors in the next five minutes may not be logged.
Exception Message: The requested schema property TFS_SCHEMA_VERSION did not match the expected value. The server requires the Microsoft Team Foundation Server 2010 (SP1) schema but the database currently implements Microsoft Team Foundation Server 2010 (RTM). (type DatabaseSchemaException)

Exception Stack Trace:    at Microsoft.TeamFoundation.Framework.Server.TeamFoundationDatabaseSettings.ValidateDatabase(TeamFoundationRequestContext requestContext, String connectionString, String expectedSchema)
   at Microsoft.TeamFoundation.Framework.Server.FrameworkSqlResourceComponent..ctor(TeamFoundationRequestContext requestContext, String databaseCategory)
   at Microsoft.TeamFoundation.Framework.Server.TeamFoundationJobService.AcquireJob(TeamFoundationRequestContext requestContext, Guid agentId, TeamFoundationJobQueueEntry jobToStart)
   at Microsoft.TeamFoundation.Framework.Server.JobRunner.AcquireJob(TeamFoundationRequestContext requestContext, TeamFoundationJobQueueEntry queuedJob)
   at Microsoft.TeamFoundation.Framework.Server.JobApplication.CheckJobQueue()
   at Microsoft.TeamFoundation.Framework.Server.JobApplication.ProcessJobQueueInternal()
   at Microsoft.TeamFoundation.Framework.Server.JobServiceUtil.RetryOperationsUntilSuccessful(RetryOperations operations)

Upon opening SQL Management Studio and right clicking the Properties of the appropriate TFS collection database, sure enough, the version was still contained the value “RTM”.  I changed the value to “SP1” (highlighted below), started the TFS Job service, and the collection servicing started immediately.  Within 5 minutes, the server was up and fully operational. 

image

I don’t know why this had to be done, but there it is.  Hope this helps others who might run into this problem.  Thanks to Stackoverflow for the answer to this.

Thursday, March 17, 2011

Installing TFS 2010 on a SQL Instance

When installing Team Foundation Server 2010 on a SQL Instance today, I ran into a couple of issues that are related to the SQL Browser service.  If the SQL browser service is running, you only need to specify the server and instance name, as “sqlservername\instancename”.  If the browser service is not running, you should specify the server name and port number, as “sqlservername, portnumber”.  The value in the screenshot below did NOT work until I removed the “\tfs” value.

image