Hi,
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?
Thanks,Alex
![]() |
0 |
![]() |
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
![]() |
0 |
![]() |
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
![]() |
0 |
![]() |
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
http://msdn2.microsoft.com/en-us/library/aa730880.aspx
http://weblogs.asp.net/scottgu/archive/2006/05/08/445742.aspx
http://www.dotnetspider.com/kb/Article1938.aspx
Few shortcomings of creating Website project (but not limited to following mention points)
- 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.
- 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)
- 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.
- 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).
- 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.
- Here are some more links in same context
http://www.thescripts.com/forum/thread613134.html
http://petesbloggerama.blogspot.com/2007/05/web-site-project-or-web-application.htmlTo create Web Application Project, you would need to download and install following sevice pack and patches (if you have not already):
![]() |
0 |
![]() |
I must admit I prefer the old style model where you can exclude files etc.
Is a website project slower for larger projects?
Thanks,
Alex
![]() |
0 |
![]() |