Share via


A Web site resource could not be found

The information in this article applies to:

  • Visual Studio 2005 Team Foundation Server

  • Visual Studio Team System 2008 Team Foundation Server

  • Windows Server 2003

  • Windows Server 2008 

  • Application-tier server

  • Health check

The Best Practices Analyzer tool for Team Foundation Server verifies the existence of the configuration file for each Web site and virtual directory for Team Foundation Server. An error appears if a Web.config file is missing. The error contains the directory path, the affected Web site, and the server name.

This error typically occurs when a Web.config file is removed or renamed. To resolve this issue, you should verify that the file is missing from the Web Services directory or has been renamed. If it has, you must restore or rename it.

Required Permissions

To perform this procedure, 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, and openWindows Explorer.

  2. Locate the directory path that the error contains.

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

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

    You can find these files in the subdirectories under the AT directory.

    • For Visual Studio 2005 Team Foundation Server, open the …\at\Program Files\TFS\Web Services directory.

    • For Visual Studio Team System 2008 Team Foundation Server, open the …\AT\Program Files\Microsoft Visual Studio 2008 Team Foundation Server\Web Services directory.

  5. Locate the Web.config file for the affected Web site or virtual directory.

  6. Copy the file to the corresponding directory on the application-tier server.

  7. Edit the global Web.config file:

    1. Locate the installation directory for the application tier, and then open the Web Services directory.

    2. Open the Web.Config file in Notepad or other text editor.

      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.

    3. Change the values 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"/>
      
    4. Save and close the file.

  8. Edit the Services Web.config file:

    1. Locate the installation directory for the application tier, and then open the Web Services/Services directory.

    2. In a text or XML editor, open the Web.Config file.

    3. Change the values 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" />
      
    4. Save and close the file.

  9. Modify any additional Web.config files that support customizations that you made to the deployment. For more information, see "Managing Team Foundation Server Configuration Settings."

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

    1. Open the Start menu, click Administrative Tools, and then click Services.

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

See Also

Tasks

An incorrect default document is detected

Concepts

The Web site for Team Foundation Server has been extended

Other Resources

Web Service Configuration Issues