How to: Verify or Correct the Services Web.config File Properties

You might encounter problems when you try to access a Web service for Team Foundation if one or more of the Web.config files for Team Foundation Server contains namespace information or if impersonation has been enabled. For an overview of Web.config files, see Managing Configuration Settings for Team Foundation Server.

Namespace information in a Web.config file interferes with how files and assemblies are loaded. Alerts might contain a blank subject line, or other event errors might indicate that the system cannot load a file or assembly. Namespace information typically is added to a Web.config file when it is edited by using the ASP.NET tab of Internet Information Services (IIS) Manager.

Impersonation should not be enabled for Web sites or virtual directories on which Team Foundation Server relies. When impersonation is enabled, you will receive login errors for SQL Server services for all users who do not have a login account defined in SQL Server.

Note

You can enable impersonation for SharePoint Products and Technologies and SQL Server Reporting Services. This configuration is supported. By using impersonation in .NET-connected applications, you allow applications to execute in the context of the client. For more information, see "ASP.NET Impersonation" in the Visual Studio Developer Center on the Microsoft Web site.

To correct these problems, use a text or XML editor to modify the Web.config files for Team Foundation.

Required Permissions

To perform these procedures, you must be a member of the Administrators security group on the application-tier server for Team Foundation.

To remove namespace information or disable impersonation

  1. Log on to the application-tier server.

  2. Open Windows Explorer, and locate the Web.config file for each Team Foundation Web service. For information about where the Web.config files are stored, see How to: Change Configuration Settings for Team Foundation Server Components.

  3. Locate the appropriate Web.Config file, as described in the following table:

    To remove namespace information for:

    Open

    Team Foundation Server Web site

    Root Web Services directory

    Team Foundation services

    Services subdirectory

    Team Foundation build service

    Build subdirectory

    Version control service

    VersionControl subdirectory

    Work item tracking service

    WorkItemTracking subdirectory

  4. In a text or XML editor, open the file.

    Note

    Even if you are logged on with administrative credentials, you must open Notepad as an administrator to perform this function on a server that is running Windows Server 2008. To open Notepad as an administrator, click Start, right-click Command Prompt, and click Run as administrator. For more information, see the Microsoft Web site.

  5. Locate the following element:

    <configuration xmlns="https://schemas.microsoft.com/.NetConfiguration/v2.0">
    

    Remove the xmlns attribute so that the element reads:

    <configuration>
    
  6. Locate the following string:

    <identity impersonate="true" />
    
  7. Change the value from "true" to "false" or remove the line.

  8. Save and close the file.

  9. Verify that impersonation is not enabled for the computer itself:

    1. Open Windows Explorer, and locate the %.NET Framework runtime install path%\Config directory.

      The default location of this directory is Drive:\WINNT\Microsoft.NET\Framework\v2.0.50727\CONFIG.

    2. Open the machine.config file in Notepad or an XML text editor.

    3. Search for the following string:

      <identity impersonate="true" />
      

      If you find it, change the value from "true" to "false" or remove the line.

    4. Save and close the file.

  10. Close and restart the Web services application for Team Foundation Server so that your changes will take effect.

See Also

Tasks

How to: Change Configuration Settings for Team Foundation Server Components

Resolving Problems Accessing Web Services

Concepts

Global Web.Config File Settings in Team Foundation Server Components

Services Web.Config File Settings in Team Foundation Server Components

Other Resources

Managing Configuration Settings for Team Foundation Server

Correcting Connection and Configuration Procedures