Web application project or Web site project which is "better"?

We are a bit confused as to which web project type is best to use.

Currently we have a number of large projects in the old style with .vbproj files. These have been upgraded to VS2008 web application projects. Compilation seems slower of upgraded projects than created from scratch web site projects. I do get the impression MS is pushing the new style format for future releases.

What are the advantages/disadvantages of the new web site project?
Where do references get stored in the new style project?
Where do the control declarations get hidden in partial classes?





3/13/2008 10:21:00 AM
asp.net.vs2005-webapp-projects 1239 articles. 0 followers. Follow

4 Replies

Similar Articles

[PageSpeed] 26
Get it on Google Play
Get it on Apple App Store

Do you mean environment settings? Web application allows to you to add as many projects as you want to your solution. It means after publishing site you will get a single dll files of evert project. If you choose a web site project, you can not add projects to solution, but can add any .cs files to special folder - App_Code, and after publishing you'll get only one dll - App_Code that will include all compiled .cs files that were on this directory

May the Force be with you
3/13/2008 1:18:37 PM

Coding mixture: ASP.NET 2.0 - Web Site vs Web Application project

Don't forget to click "Mark as Answer" on the post(s) that helped you.

NHibernate with ASP.net Problem-Design-Solution sample application
Scott ASP.net blog

3/13/2008 1:38:44 PM

Visual Studio 2005 Website Projects (which is a default project type) is not recommended for big size and long term maintenance project. Instead Web application projects should be created. However the prerequisite is that you would need to install Visual Studio 2005 Service Packs 1 and other patches to be able to create web application projects.

Here are some links on the same references


Few shortcomings of creating Website project (but not limited to following mention points)

  1. Project file is not created in case of Website type project. As a result, code files are not bind with project file, rather it works on directory structure.

  2. Since project file is missing, project and assembly references are not made directly to website projects. More over you cannot bind website projects to any source control (such as to VSS or Seapine) since binding information is kept only in project file which is missing from website project structure. (Also, website projects cannot be integrated with Visual Studio Team System http://blogs.vertigosoftware.com/teamsystem/archive/2006/11/03/4057.aspx)

  3. Website project does not create namespaces to distinguish web pages or classes but instead it appends folder name or underscore to the page / class name, leading to messy stuff. For Example, when you add two files with same name but in different folder, instead of adding these files into different namespaces it appends the folder name to the page file name.

  4. On website project compilation, multiple dll’s are created instead of one (by default for every page). This although provides maximum security (from dissembling assemblies) but make website slow during runtime. (The solution to this problem is to set batch=”false” in compilation tag of web.config file).

  5. Another problem that has been faced, is that, if you are publishing you website project to deploy it, in certain condition successful publishing status is shown, however, there is no file copied / created in published folder. This mostly occurs if you have not handled warnings and or have ignored HTML related issues in ASPX. The problem is that there are no warnings or errors reported on publication and you cannot identify reasons due to which files are not published however the status is showing successful.

  6. Here are some more links in same context

To create Web Application Project, you would need to download and install following sevice pack and patches (if you have not already):

  • (Visual Studio Service Pack 1)
  •  (Visual Studio Service Pack 1 Patche)
  • (Web Application Project Setup)
  • 0
    3/14/2008 9:42:09 AM

    I must admit I prefer the old style model where you can exclude files etc.

    Is a website project slower for larger projects?



    3/14/2008 10:10:01 AM

    Similar Artilces:

    Trying to bring in 1.1 project as VS2005 "Web Application Project"
    I have a 1.1 project from a few years ago and am trying to turn it into a 2.0 project, but when i open VS2005 (with SP1 installed) and then open the "sln" or "vbproj" file in the project, i get prompted with "The following web web projects must be convered to the new Web Site format" Where is the option to use Web Application Project instead of Web Site format?   Wasn't that one of the "gee whiz" things MS was bragging about in Service Pack 1?"If you make it idiot proof, they'll build a better idiot" I think you can try ...

    Web Application Projects vs. Web Site Project- Where is Copy Project?
    I have opted to use the Web App Project in 2005 (The 2003 Model)http://msdn2.microsoft.com/en-us/asp.net/aa336618.aspxWhy is the copy project missing when this model is used? It was there in 2003?Thank you,Patrick http://www.SURFThru.com   SURFThru.com I wanted to bump this topic again to see if any Microsoft techs had any input on this item.SURFThru.com...

    Problem when deploying Web Application project over VS2005 Web Site project
    Hi,  we ran into this issue yesterday evening when we were trying to deploy new code on production box. It was running previous version of our app that was VS 2005 Web Site project, but the new version was migrated into Web App project. New build was tested on sandbox and even on the same production machine (but under different, non public web site configured there) and was working fine. However, when we deployed on production web site, we got this error:Compiler Error Message: CS0246: The type or namespace name 'ProfileCommon' could not be found (are you missing a using directi...

    Web Site Project or Web Application Project?
    Hi all, I have a situation here.  My team's project has window and web clients, and we used Team System to control Source Code. We have a contract company that develop the generated codes for some of the web pages that being used in the web client.  They built it using Web Site Project.  We still need to develop some other web pages that has different functionalities than the code generator and one of our team member created a project which is a Web Application Project.  Now, the code generator doesn't work because it won't compile in our Web Application Pro...

    Web Application Project/Web Site Project
    Hello, I have some couple of questions... 1) How do I know a particular application already built in asp.net is "Web Application Project" or "Web Site Project" ?2) Also I have a application built in ASP.NET and If I open the source code in VS2005, Its giving a message saying this application is built in old version and it should be converted into new version before even using. So should I migrate the application to "Web Application Project" or "Web Site Project" ? . kindly advise..(Note: This application is NOT very big or complex.) Thanks in Advance..Renil. 1)A web application pro...

    Web Site Project and Web Application Project
    I hope someone can help me out with this question.I have been using Web Application Projects and like what it can offer because I am so used to how VS 2003 was structured. I am trying to teach someone the difference between Web Site Projects and Web Application Projects, but haven't been able to figure out how to create a new solution that is specific to the Web Site Project structure anymore. I thought when I installed Web Application Projects, I would have the option to switch back and forth between Web Site Projects and Web Application Projects. Is there something I am overlooking when I ...

    A "Web Application Project" for web-services ?
    I was wondering if there is something analogous to the "Web Application Project" VS add-in for Web-services. By analogous I mean: 1. All the source files in a Web-services project is compiled into a single assembly, perhaps with the exceptions of the .asmx file 2. Property pages for the project in VS display all the tabs that are available in other kinds of projects - i.e., for example, ability to specify pre and post build events, the XML documentation file etc. I really appreciate any help. Cheers, Adrigo Yes, the current release supports creating an "ASP.Net Web Service Applica...

    No "Add web deployment project" for web application
    I've installed the web deployment project, opened several examples with web application project with web deployment project added to it and would be oki, exept for one thing. I don't  have a  "Add web deployment  project" in build menu (the right click menu and the top menu) for web application, but for web site it apears. Could anyone explain why? Examples that i saw had web deployment projects added to wec applications.Thanks for any help.   I think maybe you install not correct with your Visual Studio  So try to install Visual Studio 20...

    Converting a Web Site Project to a Web Application Project ?
    I upgraded my .NET 1.1 apps to Web Site Projects long before this add on was released and was wondering if there's  a way to convert these Web Site Projects to Web Application Projects because I really did like the old way of just uploading one dll to the web server when updates came around.   Is there a way to do this?In this world there are 10 types of people, those that know binary and those who don't. Here are a couple of tutorials that describe how to do this: C# - http://webproject.scottgu.com/CSharp/Migration2/Migration2.aspx VB - http://webproject.scottgu.com/VisualBa...

    Difference between Web Site Project, and Web Application Project?
    Hi - can anyone please explain, in simple terms, what the difference is between a Web Site Project, and a Web Application Project? I've read Scotts blog at http://webproject.scottgu.com/VisualBasic/Migration/Migration.aspx - but am none the wiser. I'm about to upgrade from VS2003 to VS2005 - and don't want to waste a lot of time upgrading existing 2003 web apps to 2005 web site projects, if web application projects are more appropriate. Thanks for any guidance, Mark Hi.I have exactly the same question, and can't find any information about it.Can anyone help us?Sérgio Also i...

    Converting a Web Application Project to a Web Site Project
    I converted a VS 2003 web application to VS 2005 using the Web Application Project model.  Is it possible to convert this to a Web Site Project once it is upgraded to VS 2005? We don't have any automated tools to convert from VS2005 WAP to Websites.  If you really prefer to use the website model, I would recommend converting directly from VS2003 to Websites.  To do that you can open the VS2003 app using the "Open Website" command.Omar KhanVisual Web Developer Team I thought you were going to say that.  I have spent quite a bit of time getting rid of most of the warnin...

    migrating web site project to web application project
    hi i faced a different problem like i have all the namespace in my references folder but still the problem existed for scriptmanager,updatepanel,updateprogress     in default.aspx.designer.cs page it shows the error message can't found particular assembly  this is the declaration in default.aspx.designer.cs page protected System.Web.UI.ScriptManager ScriptManager1; Error 8 The type or namespace name 'ScriptManager' does not exist in the namespace 'System.Web.UI' (are you missing an assembly reference?) C:\Web\web\web\Logged\default.aspx.des...

    problem with a web project I added as an "existing web site"
    I've got a nettiers (DAL) solution that has 5 sub projects in it.  Each with their own dependencies. I copied a web site project into the root of the tree, then said "Add Existing Web Project".  Somehow, when I rebuild, that project gets skipped.  My question is how can I make my web project a first class project in the solution so that when I say "refernece other project" the dependencies automatically work (that is, move dll's into the bin of this web project) and of course I want that project to rebuild right along with the rest. Thanks!  Peter Kellnerhttp://73rds...

    Difference between Web Site project and (NEW) Web application project?
    Hi there,i have been reading about the new Web application project (addon) for Visual Studio 2005, all sounds really nice but i just can't put my finger on it...Whats the differences really? And why is  one better than the other?I also read about the Visual studio 2005 Web deployment projects, which from what i can gather allows us to deploy our code like back in 2003 i..e. with a BIN directory  and dll which is the compiled code behind stuff..are these in anyway linked together?Thanks in advacne for any info..Best rregardsIan Have a look here http://weblogs.asp.net/scottgu/arch...

    Web resources about - Web application project or Web site project which is "better"? - asp.net.vs2005-webapp-projects

    Resources last updated: 12/7/2015 2:30:10 PM