Differences between creating a website and creating an ASP. NET web application

Source: Internet
Author: User

When I created a website today, I found that there were two ways to create a website.

1. We used to directly create a website.

 

The project name of the solution is the path name.

2. Another method is to create a -- project, and then select Web -- create Asp.net. Web

 

The project name is:

 

 Create a website and create an ASP. NET web applicationProgramDifference: After vs2010 SP1. when you want to create a new website project, you have two options: create a website and create an Asp.net web application. What are the advantages and disadvantages of choosing "New Website" or "New Asp.net web application? How should we choose?

I checked some information online and summarized it. It may be helpful to you. Now we have been using the webapplication method, which is easy to use and suitable for relatively large systems. The website mode is "New Website", which is suitable for small and medium-sized enterprise websites.

Advantages of webapplication Programming Model:

● The website Compilation speed is fast and the incremental compilation mode is used. This part will be incrementally compiled only after the file is modified.

● Generated assembly
What is the difference between creating a website and creating an Asp.net web application,Website: generate a random Assembly name. You must use the plug-in webdeployment to generate a single assembly.
Webapplication: You can specify a website project to generate a single assembly. Because it is an independent assembly, you can specify the name, version, output location, and other information of the application assembly like other projects.

● The website can be split into multiple projects for convenient management

● It can be in and out of the projectSource codeExclude a file from management

● Easy support for vsts team build for daily build

● More powerfulCodeCheck function, and check policy is controlled by source code

● You can perform prescribed processing before and after compilation

● Strong resource class support for app_globalresources (I have not learned about it on the Internet)

● Directly upgrade a large system built using vs2003

Advantages of website programming model:

● Dynamically compile the page to see the effect immediately without compiling the entire site (main advantages)

● Same as above, this can make the error part irrelevant to the part used (it can be required that the part can be checked in only after compilation is passed)

● An assembly can be generated on each page (this method is not generally used)

● A directory can be processed as a web application, and files can be directly copied and published without project files (suitable for small sites)

● You can also compile the page into the assembly (it should not be used, and webapplication can also be implemented through the webdeployment plug-in)

Mutual conversion between the two programming models:

What is the difference between creating a website and creating an Asp.net web application,Vs2010 SP1 has a built-in Conversion Program, which can be easily converted from website to webapplication. You only need to copy the file and right-click to execute "convert to Web application.

What is the difference between creating a website and creating an Asp.net web application?No dedicated reverse Conversion Tool found, but after comparison, if the conversion is also very simple, delete all *. designer. CS, Set *. aspx ,*. ascx ,*. codebehind = "****** in the master page file "******. aspx. CS "is replaced by codefile =" ****** in batches "******. aspx. CS ", so you can switch back.

 

 

 

 

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.