Export (0) Print
Expand All
Expand Minimize

How to: Restore a Missing Web.config File

Visual Studio 2008

If you cannot access a Web service, the Web.config file for that service might be missing because it was moved, renamed, or deleted. Web.config files contain configuration settings for Visual Studio Team System Team Foundation Server. For an overview of these settings, see Managing Configuration Settings for Team Foundation Server.

If you suspect that a Web.config file is missing, search for it in the Web Services directory and subdirectories. For information about where Web.config files are stored, see How to: Change Configuration Settings for Team Foundation Server Components. If a Web.config file is missing, you must restore it to work with your current deployment configuration.

Important noteImportant Note:

Do not use the ASP.NET tab of the Internet Information Services (IIS) Manager (inetmgr) (version 6.0) to modify a configuration file. If you use this tab, the system adds an attribute to the <configuration> element of the file. This attribute interferes with normal functioning.

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 restore a missing Web.config file

  1. Log on to the application-tier server.

  2. Open Windows Explorer, open the installation directory for Team Foundation Server, and locate the Web.config file for each Web service as the following table describes:

    Web site or service

    Location of Web.config file

    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

  3. If a Web.config file is in the appropriate directory but is not named Web.config, rename the file to Web.config.

  4. If the directory does not contain a Web.config file, restore it from the installation source for Team Foundation Server.

    These files are located in the subdirectories under the AT directory. For Team System 2008 Team Foundation Server, open the \AT\Program Files\Microsoft Visual Studio 2008 Team Foundation Server\Web Services directory.

    1. Locate the Web.config file for the Web site or virtual directory whose configuration file is missing.

    2. Copy the Web.config to the corresponding directory on the application-tier server.

  5. If you restored the global Web services file (the Web.config file in the root Web Services directory), modify the file to support your deployment configuration:

    1. In a text or XML editor, open the Web.Config file that you copied to the Drive:\%Program Files%\Microsoft Visual Studio 2008 Team Foundation Server\Web Services directory.

      NoteNote:

      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.

    2. Change the value of the following elements to reflect your deployment:

      <add key="TFSNameUrl" value="http://TFSAppTierServer:8080" />
      <add key="TFS Name" value="TFSAppTierServer"/>
      <add key="TFSUrlPublic" value="https://www.TFSURLPublic.com:8081"/>
      

      For more information, see Global Web.Config File Settings in Team Foundation Server Components.

    3. Save and close the file.

  6. If you restore the Services Web.config file, modify the file to support your deployment configuration:

    1. In a text or XML editor, open the Web.Config file that you copied to the Drive\%Program Files%\Microsoft Visual Studio 2008 Team Foundation Server\Web Services\Services directory.

    2. Change the value of the following elements to reflect your deployment:

      <add key="ConnectionString" value="Application Name=TeamFoundation;Persist Security Info=False;Initial Catalog=TfsIntegration;Data Source=TFSDataTier;Integrated Security=SSPI"/>
      <add key="eventingEnabled" value="true" />
      <add key="emailNotificationFromAddress" value="TFSService@domain" />
      <add key="smtpServer" value="TFSSMTPServer" />
      

      For more information, see Services Web.Config File Settings in Team Foundation Server Components.

    3. Save and close the file.

  7. Modify any other Web.config files that support customizations that you made to the deployment.

    For more information, see Managing Configuration Settings for Team Foundation Server.

  8. Restart the Web services for your changes to take effect.

    1. On the application-tier server, click Start, point to Administrative Tools, and then click Services.

    2. Right-click World Wide Web Publishing Service (W3SVC), and then click Restart.

Community Additions

ADD
Show:
© 2014 Microsoft