Storing source code in C:\Inetpub\wwwroot

T

teddysnips

I've been brought onto a new project and there's a file that lays out
the preferred method of obtaining the source code.

This file starts as follows:

"Do not get the source for the web project throught SourceSafe explorer
or Visual Studio will attempt to open the web project from wwwroot, not
your work directory."

If I understand this correctly (by no means a certainty) it's saying
that storing your source code in C:\Inetpub\wwwroot\MyProject is a Bad
Thing.

The file goes on to explain about creating the folder structure in a
different, preferred Projects area on your system.

"Create the directory structure where you want to put the web client
source, for example d:\Work\MyProject\Source\MyProject.Client.
Share that folder as a virtual directory with the name matching the
project name (do this either through IIS console or in windows
explorer). You'll now have a empty directory.

Now open Visual Studio. Use File -> Source Control -> Open from source
control... to load the solution and projects onto your local machine."

This is not how I've been doing things for the past four years. My
C:\Inetpub\wwwroot folder stores the source code for dozens of
projects.

Have I been making a fundamental mistake? Is there de facto something
Wrong, or Bad, about using this location to store Source?

Thanks

Edward
 
L

Laurent Bugnion

Hi,

I've been brought onto a new project and there's a file that lays out
the preferred method of obtaining the source code.

This file starts as follows:

"Do not get the source for the web project throught SourceSafe explorer
or Visual Studio will attempt to open the web project from wwwroot, not
your work directory."
[snip]

We use the same policy in my firm. We don't use wwwroot to store the
code, but instead we map a virtual directory to an existing folder,
which may be any location accessible from your PC (in my case, it's
another partition on the harddisk).

The advantage of doing that are (off the top of my head):

- Grouping all your code in the same location. This way, you have the
web projects files in the same file structure than the referenced
projects' files.
- You don't handle web projects differently than "normal" projects
- It allows more flexibility for the user: The user may choose where he
wants to store his source code files

Disadvantage:

- When you open a solution referencing a web project, you must make sure
that the virtual directory has been created, and references the empty
directory where your source code will be placed from the source control
tool.

Note that all this is moot in Visual Studio 2005, because you can now
(finally...) choose any location you want for your web application
projects, including the file system.

HTH,
Laurent
 
T

teddysnips

Laurent said:
[snip]

Thanks, Laurent. Seems like six of one, half a dozen of the other (in
other words, not much to choose). I think I'll stick with my way until
VS2005 ;-}

Edward
 
L

Laurent Bugnion

Hi,

Laurent Bugnion wrote:


[snip]

Thanks, Laurent. Seems like six of one, half a dozen of the other (in
other words, not much to choose). I think I'll stick with my way until
VS2005 ;-}

Edward

I think that if you're the only developer on your projects, your way is
fine. If you work in a team with other developers on the same web
application, though, I would recommend against using wwwroot.

Greetings,
Laurent
 

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

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,077
Latest member
SangMoor21

Latest Threads

Top