New Website or New Project?

R

Ronald S. Cook

I would like to develop a new website using VS 2008. Should I choose:

File > New > Website ... and type http://localhost/MyNewWebsite

or

File > New > Project ... and set it up that way?

What's the difference? Why would I want to choose one way over the other?

Thanks,
Ron
 
C

Cowboy \(Gregory A. Beamer\)

The website will allow compiling each page on the fly, if you opt to put
source on the server. It also compiles each folder and/or page (per rules)
as a different DLL.

The web app project produces a single DLL (ala Visual Studio .NET) and you
cannot easily compile on the fly unless you stick code in the actual page
(not completely sure about that either).

I generally use the web app project type, as I deploy full sites, not
partial. In fact, I see little purpose in deploying single pages for an
Enterprise site (I am sure someone, somewhere has a good reason). You can
set either to go to http://localhost/siteName.
 
M

Mark Rae [MVP]

I generally use the web app project type, as I deploy full sites

Me too. In fact, once you install the Web Deployment Projects, it's all
fairly irrelevant anyway...
 
B

bruce barker

its just a preference. web applications are most compatiable with VS 2003
projects (which was the justification for adding the feature) .

the main difference is with web applications, there is a project file and
and visual studio compiles the codebehind files into a dll, then compiles the
aspx pages. with a web site visual studio uses the aspnet_compiler to compile
the aspx page and the codebehind. both support additional project files for
library dlls (via a solution file).

due to the compile methods, web sites need global methods defined in
app_code, and if a page references another one a reference directive is
required, or an interface should be defined in app_code, and a cast done.

the implemention of web applications is a little hacky (vs goes thru hoops
to keep the aspnet_compiler happy), but you will find lots of developers like
it.

-- bruce (sqlwork.com)
 
R

Ronald S. Cook

Thanks. Once I create my web application (which will be named
D:\Web\Westinis.RecordPlay.Client), how do I then make it so I can go to
http://localhost/recordplay to see it from my browser?

In IIS when I right-click, I see options "Convert to Application", "Add
Application", and "Add Virtual Directory". Do I want to do any of these?

Thanks again,
Ron
 
E

Eric

Thanks.  Once I create my web application (which will be named
D:\Web\Westinis.RecordPlay.Client), how do I then make it so I can go tohttp://localhost/recordplayto see it from my browser?

In IIS when I right-click, I see options "Convert to Application", "Add
Application", and "Add Virtual Directory".  Do I want to do any of these?

It has to be an IIS application. If you add an application or virtual
dir it will make a new one, so don't use an "add" option.

I don't understand the path you gave: D:\Web
\Westinis.RecordPlay.Client

It's not an HTTP path, so IIS is not used. If you make an IIS
application, you would run it like:
http://localhost/RecordPlay/PageName.aspx (note that I would not
use periods, I'm fairly sure that would be illegal)

You really need to get a beginners book. It will help a lot.

Eric.
 
C

clintonG

Actually, dotted notation is supported in directories and filenames and is
overlooked as a very valuable naming methodology that lends itself well to
development objectives. I've actually created a file naming grammar
delineated with dotted notation and while I haven't deployed the application
yet doing so is going to help improve search engine optimization as well as
make it a lot easier to use helper classes with the split method to slice
and dice directory and filename data processing.

One of these days I'll blog about it and probably catch hell from all the
narrow minded status quo thinkers but then again maybe not...

--
<%= Clinton Gallagher
NET csgallagher AT metromilwaukee.com
URL http://clintongallagher.metromilwaukee.com/



Thanks. Once I create my web application (which will be named
D:\Web\Westinis.RecordPlay.Client), how do I then make it so I can go
tohttp://localhost/recordplayto see it from my browser?

In IIS when I right-click, I see options "Convert to Application", "Add
Application", and "Add Virtual Directory". Do I want to do any of these?

It has to be an IIS application. If you add an application or virtual
dir it will make a new one, so don't use an "add" option.

I don't understand the path you gave: D:\Web
\Westinis.RecordPlay.Client

It's not an HTTP path, so IIS is not used. If you make an IIS
application, you would run it like:
http://localhost/RecordPlay/PageName.aspx (note that I would not
use periods, I'm fairly sure that would be illegal)

You really need to get a beginners book. It will help a lot.

Eric.
 

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

Latest Threads

Top