Web Site DNS, VS 2005, and Source control

W

Wayne Sepega

We are using windows 2003 standard server, VSS 2005 and VS 2005 (mostly team
dev, but some team arch and suite)

We run windows 2003 on our development boxes, this gives us the ability to
host multiple web sites running on the box at a time, this works great for
the most part. However, we have the following issue:

Lets say I have two web sites set up on my box that respond to their
corresponding host header value:

website1.localhost.com
website2.localhost.com

These DNS entries are added to all the developers hosts files, they all
point to 127.0.0.1

I do the following to create a new site:

Create the directory for the solution
Create the directory for the site
Create the virtual directory under website1 and name it MyNewSite
Create an empty solution in VS
Add a new web site to VS using the following URL
http://website1.localhost.com/MyNewSite

Once done I add the site to VSS as follows:

Drag drop the root folder to VSS
Telling it to check everything out
Open the project in VS
Set up the bindings
Check everything in
Delete from VSS any files not checked in

This all works fine, the reason for the steps above is so that when someone
else grabs the solution from VSS the Virtual directory is created under the
site and it's path is set to the same path I had set it to. This ensures
that everyone's path on the team is the same and we don't get any absolute
path issues. This was working just fine using Local host as our site.

Recently we've decided to set up each web site on our local boxes, as stated
above, so we are no longer using just local host. So I duplicate the above
steps with a brand new solution/website.

Once I've done the above and have the site under Source Control I delete the
Virtual directory and source files/dirs from my drive. I then pull the
solution from source control allowing VS to recreate the source directories
and virtual directory.

Once the solution is finally loaded it now has the web site as:
http://localhost/MyNewWebSite

instead of
http://website1.localhost.com/MyNewSite

This causes the virtual directory to be created under the wrong site in IIS.
If I remove all the blank host headers that respond to port 80, the site is
then pulled down as a file system based web site.

It is important that the DNS be preserved so that the site gets created
under the correct web site in IIS, otherwise some of our apps will not work
correctly. How do I get the solution/site when checked into VSS to keep the
DNS that I created it with?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top