468,107 Members | 1,414 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,107 developers. It's quick & easy.

Whats diference?

Hi, what is diference between:

File -New Web Site
and
File -New Project -VB/C# -Web Application

??????

VS 2005

Thanks!
Oct 10 '07 #1
7 2026
Two completely different types of project. The first creates a Web Site
Project. The second created a Web Application Project.

The main difference is the web site project does not compile into a single
dll, it creates many dlls, one for each page or directory.

The Web Application Project compiles all the code in the project into a
single dlls. The Web Application Project behaves more like the one that
shipped with VS 2003 and 2002. It was introduced for VS 2005 after launch
and later integrated into SP1 because a large number of developers didn't
like the new Web Site Project.
--
Hope this helps,
Mark Fitzpatrick
Microsoft MVP - Expression
"Paulo" <pr*****@uol.com.brwrote in message
news:u2**************@TK2MSFTNGP03.phx.gbl...
Hi, what is diference between:

File -New Web Site
and
File -New Project -VB/C# -Web Application

??????

VS 2005

Thanks!

Oct 10 '07 #2
web application projects still create one dll per page. the difference
is that visual studio compiles the codebehind files into one dll, then
call the asp_compiler to build a dll per page, referencing the dll. so
web application actually end up with one more dll than web sites.

the practical difference is for web applications a project file is
maintained by visual studio (to compile the codebehind files) and
because the codebehinds are in one dll, they implicitly have a reference
to each other.

in a web site the pages are independent and if a page references another
page the proper way (as good coding would require anyway) is to
implement an interface in the app_code dir, then have the page implement
the interface. to call methods on another page, you cast it the known
interface. this turned out to be too complicated for causal coders, so
web application projects were added to asp.net 2.0.

i'd recommend you use web sites instead of web applications, as its a
cleaner approach.
-- bruce (sqlwork.com)


Mark Fitzpatrick wrote:
Two completely different types of project. The first creates a Web Site
Project. The second created a Web Application Project.

The main difference is the web site project does not compile into a single
dll, it creates many dlls, one for each page or directory.

The Web Application Project compiles all the code in the project into a
single dlls. The Web Application Project behaves more like the one that
shipped with VS 2003 and 2002. It was introduced for VS 2005 after launch
and later integrated into SP1 because a large number of developers didn't
like the new Web Site Project.

Oct 10 '07 #3
Bruce,
Where does the web application create additional dlls? This was the whole
point of the web application project and is one of the major features that
Scott Guthrie mentions in his announcement about their release? I've been
using it since the beta version of it and I only have the one dll for the
application, not one per page. Are you talking about the .compiled files
that are within the ASP.Net tempory cache? The only .compiled files I have
are for the ascx user controls in my app, not for all the pages.

--
Mark Fitzpatrick
Microsoft MVP - Expression

"bruce barker" <no****@nospam.comwrote in message
news:OB**************@TK2MSFTNGP06.phx.gbl...
web application projects still create one dll per page. the difference is
that visual studio compiles the codebehind files into one dll, then call
the asp_compiler to build a dll per page, referencing the dll. so web
application actually end up with one more dll than web sites.

the practical difference is for web applications a project file is
maintained by visual studio (to compile the codebehind files) and because
the codebehinds are in one dll, they implicitly have a reference to each
other.

in a web site the pages are independent and if a page references another
page the proper way (as good coding would require anyway) is to implement
an interface in the app_code dir, then have the page implement the
interface. to call methods on another page, you cast it the known
interface. this turned out to be too complicated for causal coders, so web
application projects were added to asp.net 2.0.

i'd recommend you use web sites instead of web applications, as its a
cleaner approach.
-- bruce (sqlwork.com)


Mark Fitzpatrick wrote:
>Two completely different types of project. The first creates a Web Site
Project. The second created a Web Application Project.

The main difference is the web site project does not compile into a
single dll, it creates many dlls, one for each page or directory.

The Web Application Project compiles all the code in the project into a
single dlls. The Web Application Project behaves more like the one that
shipped with VS 2003 and 2002. It was introduced for VS 2005 after launch
and later integrated into SP1 because a large number of developers didn't
like the new Web Site Project.
Oct 10 '07 #4
So, what you all recommends?

WebApp ou WebSite ?

"Mark Fitzpatrick" <ma******@fitzme.comescreveu na mensagem
news:ep**************@TK2MSFTNGP04.phx.gbl...
Bruce,
Where does the web application create additional dlls? This was the whole
point of the web application project and is one of the major features that
Scott Guthrie mentions in his announcement about their release? I've been
using it since the beta version of it and I only have the one dll for the
application, not one per page. Are you talking about the .compiled files
that are within the ASP.Net tempory cache? The only .compiled files I have
are for the ascx user controls in my app, not for all the pages.

--
Mark Fitzpatrick
Microsoft MVP - Expression

"bruce barker" <no****@nospam.comwrote in message
news:OB**************@TK2MSFTNGP06.phx.gbl...
>web application projects still create one dll per page. the difference is
that visual studio compiles the codebehind files into one dll, then call
the asp_compiler to build a dll per page, referencing the dll. so web
application actually end up with one more dll than web sites.

the practical difference is for web applications a project file is
maintained by visual studio (to compile the codebehind files) and because
the codebehinds are in one dll, they implicitly have a reference to each
other.

in a web site the pages are independent and if a page references another
page the proper way (as good coding would require anyway) is to implement
an interface in the app_code dir, then have the page implement the
interface. to call methods on another page, you cast it the known
interface. this turned out to be too complicated for causal coders, so
web application projects were added to asp.net 2.0.

i'd recommend you use web sites instead of web applications, as its a
cleaner approach.
-- bruce (sqlwork.com)


Mark Fitzpatrick wrote:
>>Two completely different types of project. The first creates a Web Site
Project. The second created a Web Application Project.

The main difference is the web site project does not compile into a
single dll, it creates many dlls, one for each page or directory.

The Web Application Project compiles all the code in the project into a
single dlls. The Web Application Project behaves more like the one that
shipped with VS 2003 and 2002. It was introduced for VS 2005 after
launch and later integrated into SP1 because a large number of
developers didn't like the new Web Site Project.

Oct 10 '07 #5
Actually it seems a little more complicated than that.

As well as those two methods, you can also create a website in IIS and
Microsoft Expression.

All the methods seem slightly incompatible. Depending on how you created
it, you get different errors sometmes running them. VS uses its own web
server I think.

Anyway, as you asked, what's the best way ?
-----Original Message-----
From: Paulo [mailto:pr*****@uol.com.br]
Posted At: Wednesday, 10 October 2007 9:28 PM
Posted To: microsoft.public.dotnet.framework.aspnet
Conversation: Whats diference?
Subject: Whats diference?

Hi, what is diference between:

File -New Web Site
and
File -New Project -VB/C# -Web Application

??????

VS 2005

Thanks!

Oct 10 '07 #6
WAP project creates a temporary assembly for each ASPX "Page" in addition to
the single assembly for the "Site" in the /bin folder, same as VS 2003 always
did.
However Bruce asserts that Web Site projects are preferable, an idea with
which I totally disagree. It is Web Application Projects that are cleaner,
more manageable, and less prone to errors.
--Peter
Recursion: see Recursion
site: http://www.eggheadcafe.com
unBlog: http://petesbloggerama.blogspot.com
BlogMetaFinder: http://www.blogmetafinder.com

"Mark Fitzpatrick" wrote:
Bruce,
Where does the web application create additional dlls? This was the whole
point of the web application project and is one of the major features that
Scott Guthrie mentions in his announcement about their release? I've been
using it since the beta version of it and I only have the one dll for the
application, not one per page. Are you talking about the .compiled files
that are within the ASP.Net tempory cache? The only .compiled files I have
are for the ascx user controls in my app, not for all the pages.

--
Mark Fitzpatrick
Microsoft MVP - Expression

"bruce barker" <no****@nospam.comwrote in message
news:OB**************@TK2MSFTNGP06.phx.gbl...
web application projects still create one dll per page. the difference is
that visual studio compiles the codebehind files into one dll, then call
the asp_compiler to build a dll per page, referencing the dll. so web
application actually end up with one more dll than web sites.

the practical difference is for web applications a project file is
maintained by visual studio (to compile the codebehind files) and because
the codebehinds are in one dll, they implicitly have a reference to each
other.

in a web site the pages are independent and if a page references another
page the proper way (as good coding would require anyway) is to implement
an interface in the app_code dir, then have the page implement the
interface. to call methods on another page, you cast it the known
interface. this turned out to be too complicated for causal coders, so web
application projects were added to asp.net 2.0.

i'd recommend you use web sites instead of web applications, as its a
cleaner approach.
-- bruce (sqlwork.com)


Mark Fitzpatrick wrote:
Two completely different types of project. The first creates a Web Site
Project. The second created a Web Application Project.

The main difference is the web site project does not compile into a
single dll, it creates many dlls, one for each page or directory.

The Web Application Project compiles all the code in the project into a
single dlls. The Web Application Project behaves more like the one that
shipped with VS 2003 and 2002. It was introduced for VS 2005 after launch
and later integrated into SP1 because a large number of developers didn't
like the new Web Site Project.

Oct 10 '07 #7
"Peter Bromberg [C# MVP]" <pb*******@yahoo.yohohhoandabottleofrum.comwrote
in message news:6B**********************************@microsof t.com...
However Bruce asserts that Web Site projects are preferable, an idea with
which I totally disagree.
Me too, FWIW...
It is Web Application Projects that are cleaner, more manageable, and less
prone to errors.
Absolutely! I never, ever create a web site project in ASP.NET...

--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Oct 10 '07 #8

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

9 posts views Thread by cricketunes | last post: by
3 posts views Thread by Kevin Steffer | last post: by
2 posts views Thread by SOR | last post: by
1 post views Thread by Bruno Piovan | last post: by
4 posts views Thread by David Lozzi | last post: by
4 posts views Thread by sophie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.