Don't Develop In The Web Root

posted on 2005-03-28 at 23:19:03 by Joel Ross

Tim Haines says you shouldn't develop in the web root. And he gives some advice to get around some of the gotchas with doing it.

I agree with Tim. But here's how I set things up. My main development happens in a virtual folder on port 80, as does most of my debugging work. But I also have another website (on another port, like 87 or 88) that has it's root as the same folder as the virtual folder on port 80. That way, I can test that everything works correctly when the app runs as the root.

Other things I do? I have www.localhost.com mapped to 127.0.0.1. Why? We ran into a few URL parsing issues that didn't work correctly when there were periods in the domain name. Of course, I'm missing out on whatever www.localhost.com really is!

All of these issues should be something taken into account when developing the software, but in big teams, inevitably these issues will pop up from time to time. Better to have a way to develop and debug in all the cases locally than try to debug a problem on a remote server.

Categories: ASP.NET