blogs.conchango.com

welcome to the conchango blogging site
Welcome to blogs.conchango.com Sign in | Join | Help
in Search

Stuart Preston's Blog

Mostly about Visual Studio Team System, Team Foundation Server, Engineering Practices and Application Lifecycle Management.

Deploying ASP.NET applications on Team Foundation Server

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:

"C:\Program Files\Common Files\Microsoft Shared\web server extensions\60\BIN\stsadm.exe" -o addpath -url http://[ComputerName]/VirtualDirectoryName] -type exclusion

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" ;)

Published 15 March 2006 22:53 by Stuart.Preston

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

No Comments

Leave a Comment

(required) 
(optional)
(required) 
Submit
Powered by Community Server (Personal Edition), by Telligent Systems