VS 2005 Web Site Project vs Web Application Project

R

rmgalante

I was developing a large web site in VS 2005 as a web site project. I
was having problems with the VS 2005 publish tool. It was slow, and
provided no feedback. It has other issues as outlined below.

Here is my solution. I converted the application from a Web Site
Project (WSP) to a Web Application Project (WAP). Go to http://webproject.scottgu.com/
and read about the Web Application Project in VS 2005.

Why?

1. When publishing the application as a WSP, the entire site gets
deleted. That means that the images that are uploaded to the site have
to be downloaded first, and integrated into the project, before it can
be published. Forget to do this, and people might not see their newer
images.
2. Because the images were part of the project, they were getting
stored in SourceSafe with the project, which write-protected the
files. So if you publish the images, and they are write-protected, the
user won't be able to overwrite them with a new image. One has to
remember to checkout the images before publishing the web site.
3. No way exists in VS 2005 Web Site Projects to exclude a folder from
the build and publish commands. You can exclude individual files, but
this is not an acceptable solution when you have hundreds or thousands
of images.
4. The VS 2005 Web Site Project publish command provides no feedback
on the progress of the process in the output window. You can sit there
for an hour, and wonder what's happening until it's finished.

The Web Application Project has the following benefits.

1. When you publish a site, you can specify whether or not you want to
delete the entire site. So you don't have to worry about downloading
the users' images before you publish anymore.
2. You can exclude the image folders from the build and publish
commands. So the images in those folders don't get stored in
SourceSafe, and they don't get write-protected.
3. Lots of feedback is displayed in the output panel during the
publish procedure.
4. The entire application gets compiled the first time you run it. So
subsequent visits are faster. But that first compilation has a long
delay. So you have to make sure you keep the application in memory. I
have been running a periodic process that does that every 15 minutes.
So
after I publish the site, the periodic process will compile the
application on all the servers in the web farm.
5. It will be much easier to maintain the site now.

The only negative is the long, long compile time the first time it
runs. But that was a problem with VS 2003 projects. This was one of
the benefits of VS 2005 WSP projects. VS 2005 WSPs perform partial
compilations at runtime, where only the pages that are accessed get
compiled. But I should be able to keep the WAP compiled by running the
periodic procedure that launches the site every 15 minutes.
 

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,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top