Just thought I'd repost a response I gave to a user today on the Visual Studio Team Foundation forum http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=299464&SiteID=1.
The problem:
I am trying to deploy an ASP.Net Web Service project to the same server that I have TFS on. This was a freshly formatted server that has had just TFS and its prerequisites installed. [...]
When I try to point the browser to http://localhost/WesteelERP/ I get a page that says: "Unable to connect to database. Check database connection information and make sure the database server is running. For tips on troubleshooting this error, search for article 823287 in the Microsoft Knowledge Base at http://support.microsoft.com.". What I would expect is a page saying Directory Listing Denied since there is no default.aspx page included in my deployment.
[...]
everything works as expected when I install this to any other machine, so it must be something to do with how this box is configured for TFS, I just have no idea what's going on here...
My response:
This is most likely because Sharepoint (WSS) is installed on the "Default Web Site" as part of the TFS installation. You need to exclude your Virtual Directory from Sharepoint's control to run a "normal" .NET application on port 80.
You can achieve this using the following command:
You then may need to upgrade your Virtual Directory to run under .NET 2.0 instead of .NET 1.1. You can do this by looking in the ASP.NET tab in your IIS > Website > Virtual Directory properties and selecting the correct version or you can do this programatically by issuing the following command:
"c:\windows\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe" -sn W3SVC/1/Root/[VirtualDirectoryName]
Finally, don't forget to check the application has its own Application Pool otherwise you end up running as "TFSService" ;)