TF30059: Fatal error while initializing web service

      Comments Off on TF30059: Fatal error while initializing web service

tfs-2008I  work on this task some days very hard. The problems is very trivial, because if you are thinking on official way maybe you cannot solve the problem.:D.

So after you are try all googled info, forums and MSDN solution please try this solution. Maybe help you to skip some work days.

All error apears in the following configuration:
1. Windows 2008 x86
2. Microsoft Team Fundation Server 2008
3. MSSQL 2008 x86
4. (Virtualized with VmWare Migration Tool and running on Vmware Esx Server)

Typical errors looks like the folowing:

TF53010: The following error has occurred in a Team Foundation component or extension:
Date (UTC): 10/30/2009 11:50:39 AM
Machine: TFSSERVER
Application Domain: /LM/W3SVC/1701980878/ROOT/VersionControl-21-129013770382143212
Assembly: Microsoft.TeamFoundation.Common, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a; v2.0.50727
Process Details:
Process Name: w3wp
Process Id: 3096
Thread Id: 5892
Account name: NT AUTHORITY\NETWORK SERVICE

Detailed Message: TF53002: Unable to obtain registration data for application VersionControl.
Web Request Details
Url: http://tfsserver:8080/VersionControl/v1.0/repository.asmx [method: POST]
User Agent: Team Foundation (devenv.exe, 9.0.30729.1)
Headers: Content-Length=319&Content-Type=application%2fsoap%2bxml%3b+charset%3dutf-8&Accept-Encoding=gzip%2cgzip%2cgzip&Accept-Language=en-US&Authorization=NTLM+TlRMTVNTUAADAAAAAAAAAFgAAAAAAAAAWAAAAAAAAABYAAAAAAAAAFgAAAAAAAAAWAAAAAAAAABYAAAANcKI4gYAchcAAAAPJhzbSBUHFQvdfCE3R2UVwg%3d%3d&Expect=100-continue&Host=tfsserver%3a8080&User-Agent=Team+Foundation+(devenv.exe%2c+9.0.30729.1)&X-TFS-Version=1.0.0.0&X-TFS-Session=45ebc9b6-3bdc-4337-b130-7ae1bad1ee23
Path: /VersionControl/v1.0/repository.asmx
Local Request: True
Host Address: ::1
User: MYDOMAIN\runing.user [authentication type: NTLM]

Exception Message: TF50309: The following account does not have sufficient permissions to complete the operation: NT AUTHORITY\NETWORK SERVICE. Check the permissions for the account and grant the appropriate permissions to perform this operation. (type SecurityException)

Exception Stack Trace: at Microsoft.TeamFoundation.Proxy.BisRegistrationProxy.GetRegistrationEntries(String toolId)
at Microsoft.TeamFoundation.Proxy.BisRegistrationService.RefreshMemoryCache()
at Microsoft.TeamFoundation.Proxy.BisRegistrationService.RefreshCachesIfNeeded(Boolean direct)
at Microsoft.TeamFoundation.Proxy.BisRegistrationService.GetRegistrationEntries(String toolId)
at Microsoft.TeamFoundation.Server.TeamFoundationApplication.GetRegistrationEntry(String toolName)
at Microsoft.TeamFoundation.Server.TeamFoundationApplication.GetDatabaseConnectionString(String toolName, String dbName)

So the solution

Start->Control Panel -> Administrative Tools -> Internet Information Services (IIS) Manager
After the IIS7 management Interface is started, select the TFSSERVERNAME (or your local server name).
Click on the Application Pools and look for the following pool Microsoft Team Foundation Server Application Pool, here you need to change the Identity from the NETWORK SERVICE to your TFS server running account. If you are install with the Instalation manual, this maybe a DomainName\TFSSERVICE account.
For change process please RigthClick on the Microsoft Team Foundation Server Application Pool select the Advanced Settings and on the Process Model tree change the identity to DomainName\TFSSERVICE.

Restart the IIS7 server and enjoy your work.

Some screenshot:

tfs_iis_pool

tfs_iis_pool_adv