locked
Web Application Project or Web Site Project RRS feed

  • Question

  • User771044911 posted

    I've been learning ASP.net with C# for about 6 months now.  I'm getting pretty good and learning new things every day.  I ran into a dilemma and wanted to get feedback on which one is best?  I recently was given a project to build a web application that would involve SQL database, insert, update, delete and read data via ASP.net front end.  I know I can handle the coding.  However, I ran into a decision making.  Do I create a Web Application Project or a Web Site Project.  I did some reading up and got more confuse because both have advantages and disadvantages. One allow precompile and the other allow dynamic compile/precompile.  PS: I don't feel safe to putting the source code on the IIS server.  What are you guys and girls using to build web system with SQL backend? Any feedback would be greatly appreciated.

    Thank you.

    Wednesday, February 1, 2012 11:03 AM

Answers

  • User1564875471 posted

    and don't want to have anyone change the live code and cause major problems.

    This should not be a reason for choosing web application project (WAP) model over website because you can alwasy publish your website without code using VS publish command http://www.asp.net/web-forms/tutorials/deployment/precompiling-your-website-vb

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, February 2, 2012 3:34 AM

All replies

  • User1564875471 posted

    Simpler coding:

    Website is much better for begginers because of the following reasons:

    1. It provides strongly typed resource classes while working with langauge resource files.
    2. It provides strongly typed profile properties incase you're using ASP.NET profile services.

    Code Hiding options:

    Web site gives more code hiding options while deploying your sites.It allows you to hide not only the code behind but also the markup code (aspx,ascx..)

    Applying continuous updates:

    Websites is not flexible in terms of applying continuous updates to the production version because everytime you need to apply new changes, you have to deploy full version from your website.However, by using web application model, you can deploy only the new aspx markup and the new web application dll (which contains the code behind of all pages).

     

    Also, make sure to refer to the following artcile which summarizes the major differences between tte two models:

    http://msdn.microsoft.com/en-us/library/aa730880%28v=vs.80%29.aspx

     

    Forgot something:

    You can use website model only if you are using web forms and not MVC because MVC uses web application project model and you can't change this.

    Wednesday, February 1, 2012 11:13 AM
  • User771044911 posted

    After more research, I've decided to go with Web Project instead of Web Site because I want to keep the code unify and don't want to have anyone change the live code and cause major problems. I don't mind recompiling the project  for new changes.  What are you guys thought on my decision?  

    Wednesday, February 1, 2012 11:42 AM
  • User1564875471 posted

    and don't want to have anyone change the live code and cause major problems.

    This should not be a reason for choosing web application project (WAP) model over website because you can alwasy publish your website without code using VS publish command http://www.asp.net/web-forms/tutorials/deployment/precompiling-your-website-vb

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, February 2, 2012 3:34 AM