Very asp.net.

Source: Internet
Author: User
Tags iis pack visual studio

Web programming is also difficult when the ASP is first published, because IIS is required to process ASP pages. Later, ASP.net 2.0 and Visual studio®2005 made all the work easier by introducing a web development model. With this web site model, you do not have to create a new project in Visual Studio, but you can point to a directory and start writing Web pages and code. In addition, you can use the built-in asp.net Development Server quick test site, asp.net Development server to host asp.net in a local process, and eliminates the prerequisite that IIS must be installed for development. The beauty of this web site model is that you don't have to consider packaging and deploying when developing Web applications. What if you need another class? You can start writing by adding a. cs file to the App_Code directory. What do I do when I want to store a localizable string in a resource file? Add a. resx file to the App_GlobalResources directory and type a string. It's all answers; you don't have to think about compiling and deploying at all.

When you are ready to deploy, you have a variety of alternatives. The simplest scenario is to copy the files to the primary running server and compile each file as required (as in the test environment). The second scenario is to precompile the application into a binary version using the Aspnet_compiler.exe utility, leaving only a set of assemblies, static content, and configuration files to be placed on the server. The third scenario also uses aspnet_compiler.exe, but to create an updatable binary deployment where the. as*x file remains unchanged (and can be modified), and all code files are compiled into binary assemblies.

This seems to cover every possible scenario where a developer can write a WEB application with single-minded intent and then make a packaging and deployment decision at a later actual deployment. However, this model has also met with considerable opposition, especially when WEB projects that are accustomed to their own development are objected to by developers of actual projects specified in the actual project file, which allow injection of pre and post generated functions, Excludes files from the build process and uses command-line switches to switch between debug and release versions. In view of this, Microsoft quickly launched a WEB application project (WAP), which was originally published as a plug-in for Visual Studio 2005, now included in Visual Studio Service Pack 1 (SP1), Vi Sual Studio Service Pack 1 (SP1) can be downloaded from MSDN.MICROSOFT.COM/VSTUDIO/SUPPORT/VS2005SP1.

WAP replaces the Web site model that is very close to the Visual Studio. NET 2003 Web project model. The new WAP model compiles all source code files during the build process and generates an assembly for deployment in the local/bin directory. WAP also makes it easier to increment the new partial-class code-behind model introduced by ASP.net 2.0 because you can now open the Visual Studio. NET 2003 project and modify only. sln and. csproj (or. vbproj) files during the conversion process. You can then convert each file and its code-behind class to a new partial-class model that is not related to any other file in the project (The action method is: by right-clicking individual files in Solution Explorer and choosing Convert to WEB application, you can also let them use the old model. This is very different from converting a Visual Studio. NET 2003 Web project to a Web site model, and converting to a Web site model transforms all files at the same time and does not support incremental adoption.

Finally, there is a new project type called "Web Deployment Project" (The topic of this column), which introduces many additional deployment options for both Web site projects and Web application projects. Web Deployment projects make up for legacy vulnerabilities in deployment options that are both for Web site applications and Web application projects, and can be simple and scalable for almost any deployment scenario. To get a better idea of what the new project type adds, let's review what happened before the Web deployment project was launched.

Deployed in ASP.net 2.0

When you use the Web site model to build your application, you have the option of precompiling the deployment site. "Build |" in Visual Studio 2005 Publish menu or Aspnet_compiler.exe directly from the command-line utility, you can access the precompiled utility. Figure 1 shows the interface of this tool displayed by Visual Studio.

Figure 1 Web Publishing Utility

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.