ASP.NET is also called ASP , but it is not just an Simple upgrade of ASP, but a new generation Active Server Pages scripting language launched by Microsoft. ASP.NET is part of Microsoft's new architecture. Net, which makes everyone's network life easier. First, it is important to point out that ASP.NET is not only a new interface and fixes some upgraded version of ASP3.0 (ie, different from the ASP2.0 upgrade to ASP3.0 transition). More importantly, ASP.NET has absorbed the maximum advantages of ASP previous versions and with reference to the development advantage of Java, VB languages, and also fixes the previous ASP version of the running error. To understand the true face of ASP.NET, we must first learn about Microsoft .NET strategy. 1.1.1 Microsoft's History History With the arrival of the network economy, Microsoft wishes to help users, can use any tools anywhere, and enjoy the happiness brought by network communication. The .NET strategy is set up for this goal. Microsoft announced that it will focus on the development of network services and network resources in the future, and it will provide a larger, useful network resources and services to the public. The official name of Microsoft's new generation platform is called "New Generation Windows Service" (NGWS), now Microsoft has registered the formal trademark for this platform - Microsoft.net. In the .NET environment, Microsoft is more than just the developers of platforms and products, but also as a architecture service provider, application provider to carry out all-round Internet services. Talking about the new technologies used in this platform, Microsoft revealed that it will provide more new products and a full set of services in the .NET environment.
The basic idea of the Microsoft .NET platform is that the side focus on a single website or device connected to the Internet, transferring to the computer, equipment, and service groups, making it a more extensive solution. The user will be able to control the transmission, time, and content of the information. Computers, devices, and services will be able to complement, thereby providing a rich service, rather than as is island, providing unique integration by the user. Enterprises can provide a way to allow users to seamlessly embed their products and services in their electronic framework. This idea will expand personal permissions given by PC in the 1980s.
Microsoft .NET will create a new situation of the Internet, and HTML-based display information will be enhanced by programmable XML-based information. XML is a widely supported industry standard defined by the World Wide Web Alliance, and web browser standards are also created by the organization. Microsoft has put a lot of effort for developing it, but it is not a proprietary technology of Microsoft. XML provides a way to separate actual data from the demo view of the data. This is the key to the new generation of the Internet, providing the way information to organize, program, and edit information; can distribute data more effectively to different digital devices; allow each site to cooperate, provide a set of interactions "Web Service". 1.1.2 Microsoft introduction 1.1.2.1 Microsoft .NET Overview Microsoft .NET platforms include .NET infrastructure and tools for creating and operating a new generation of services; enabled .NET User Experience; used to establish A new generation of highly distributed numbers of millions of .NET building blocks; and .NET device software for enabling a new generation of smart Internet devices. Microsoft .NET products and services - including Windows.net, with core integration kits established by building building blocks; MsNTM .NET; personal ordering service; office.net; Visual Studio .NET; and BCENTRALTM for .NET.
The breakthrough improvement in the .NET environment is: 1. Use a unified Internet standard such as XML to connect different system;
2. This is the first large-scale high-distributed application service architecture on the Internet;
3. Used a management program called "Alliance", this program can fully manage the service running in the platform and provide a powerful security background;
The .NET platform includes the following components: 1. User Data Access Technology. These include a new XML-based, browser-based mixed information architecture called "universal picture board"; 2. Construction and Development Tools Based on Windows DNA 2000;
3. A series of modular services include certifications, information transfer, storage, search, and software delivery functions;
4. A series of software for driving customer equipment;
1.1.2.2 Important Significance Brought by Microsoft.Net Platform
Let's take a look at Microsoft .NET's huge significance to developers, IT professionals, and corporate applications. For developers
Microsoft .NET strategy is to use the Internet itself as the basis for building a new generation of operating systems, and extends reasonably to the design ideas of the Internet and operating systems. In this way, developers will create an application that get rid of the device hardware to easily implement internet connection. Microsoft .NET is undoubtedly a very important milestone in today's computer technology to calculate the time. The core components of the .NET include: • A set of build blocks for creating an Internet operating system, including Passport.net (for user authentication) and services for file storage, user preference management, calendar management, and numerous other Task • Build and manage the basic structure and tools of new generation services, including Visual Studio.NET, .NET Enterprise Server, .NET Framework, and Windows.net • Enable .NET Device Software for Novel Smart Internet Devices. NET User Experience. NET is very important for end users because the functionality of the computer will be greatly improved, while computer operations will become very simple. In particular, users will completely get rid of artificial hardware: users can freely surf the Internet, rather than shaped in the position of the portable computer - access to any desktop system, any laptop, any mobile phone or PDA And can be integrated across applications. .NET enables users to easily connect Internet connections, and easily completing those matters that are very time-consuming and laborious, they often require users to perform data re-enter and need to run for a few hours to complete. By merged a plurality of security data streams into a single user interface (or even programmable decision engine), the NET architecture will free from the sharing of users from the data shaft of today's Web. Users can freely access, freely view, free to use their data. .NET is also important for developers because it will not only change the development of developers, but also enable developers to create new applications. The core of the new development example is the introduction of the concept of web services. The Web Service is an extremely open service that exposes its functionality, highly public service, which is a functionality, which is a functionality, which brosions its functionality. SOAP is an agreement based on Scalable Markup Language (XML). In the past, developers build applications by integrating local system services. Under this model, developers can access rich development resources and strictly control the behavior of the application. Today, developers have been largely broken from the shackles of this model, dedicated to constructing an N-layer system with complex structures, which integrates many applications on the network, greatly enhanced the application The value of the program. In this way, developers can concentrate their unique business value, rather than build basic structures. The gratifying situation will come to life: the time of the software launch market is greatly shortened, and the programming efficiency of the developer is significantly improved, and ultimately the software is presented to the user. We are entering a new computing age - a era that is implemented by the Internet (especially Internet core technology XML). With XML, you can create applications that are very powerful for anyone from anywhere. It greatly expands the functionality of the application and implements software dynamics. In this case, the software is not completely installed from the disc installation, but evolved into a service - TV similar to the ID call or a toll-on number of times - people can order via communication media Service. The N-layer computing technology has the characteristics of greatly improved productivity, tight coupling, and the web concept has the characteristics of news, loose coupling, and we will organically combat it together to achieve the above ideas. We refer to this computational style as a web service, and its appearance marks a new era of human beings that have entered the application development technology. Web services are an application that can be displayed on the Internet and Enterprise Internal Opportunities by programming and using standard Internet protocols, like hypertext Transfer Protocol (HTTP), and XML.
Web services can also be regarded as component programming on the web. In theory, developers can integrate Web services into applications by calling the Web Application Programming Interface (API). Its calling method is similar to calling the local service, and the difference is that the Web API call can be sent to a service in the remote system via the Internet. For example, the Microsoft Passport (Passport) service enables developers to authenticate applications. By programming the Passport service, developers can take advantage of Passport's basic structure, maintain the user database by running Passport to ensure that it is running, regular backup, and more. The .NET is created according to this Web service principle, Microsoft is currently being provided with this basic structure to achieve this new web service through each part of the .NET platform. The Visual Studio.net, .NET Framework, Windows.net, and .NET Enterprise Server is a new generation of development tools and basic structures that are tailoring for application development based on web service model. .NET build block service, new .NET device support, and upcoming .NET user experience, will completely capture this problem to draw a success, so that people can make full use of Web service models, wishing to develop A new generation of applications. .NET's important sense to IT professionals, IT professionals can use the same technologies as constructing .NET platforms. The .NET Enterprise Servers and Windows 2000 operating systems provide a solid foundation for creating applications that have highly manageable, quickly enterprising. They utilize the Scalable Markup Language (XML), so the procedures created on this platform have been very valuable as the Web architecture is innovative. The core of the .NET platform is to build an application in a way that is valid, sliberate classes to achieve an unprecedented scale. The Web service model on this platform refers to: The central business elements of enterprise applications are usually managed by local management (such as user authentication, file storage, user preference management, calendar, email, etc.) without local. Manage, can be seamlessly ordered. In order to store user files and messages, IT professionals often install new independent disk redundant arrays (RAID arrays) on the server, and .NET, they will cost less energy in this area, and more Committed to adding benefits for the company. The web service model will also dynamically configure the release and update of new software. The user will work with extremely closely connected ways, making it easier to manage. Simplified management can make IT professionals to adapt to unpredictable business needs. Developing applications The NET Web service model will open a new way for the creation of an enterprise application. Through the combination of various services inside and outside, it is easy to combine the relevant data of the company's internal data and customers and partners, greatly simplifying the creation process of the application. This explores unprecedented features to end users. For example, using a company's employee welfare program, you can order information from its HR database, and order Welfare Management Corporation from Web to order the services of the wage management company. Terminal users can operate in a simple, intuitive interface, and this interface can display their accumulated vacation time, personal resulting benefits, and last payment.
.NET's important significance of the company Microsoft .NET platform will fundamentally improve the interaction between computers and users, maximize the important role of calculating technology in e-commerce. First, let's analyze the status quo of current business computing world: the means for interacting with computers is extremely limited - typically use keyboards and mice to input, using monitor monitoring output. User information is basically local information; if you log in from another machine, you cannot get the user's personal preference settings, data, and applications. The user must processes information in person, and the user is automatically operated by setting the intelligent option, and it is not seen in the paper. The same user is stored in different applications and sites, it is difficult (or impossible) to automatically merge and associate, and users cannot view. Users who want to work at home or on the road, can not facilitate access to applications and data in the office computer. This is undoubtedly a gap that prevents people from getting higher working efficiency. You cannot use other devices to access data designed for specific devices (these devices include PCs, pager, mobile phones, and PDA, etc.); up to regular synchronization. .NET will guarantee all the defects in today's computing technology. .NET can be implemented to ensure that users can access their personal data and application's magnificent blueprints from any location. In addition, .NET technology also implements multiple applications on logically loose coupling links and tight coupling links. Users can interact with their personal data by handwriting, voice, and image technology. These data will be safely stored on the Internet, and users can access these data through mobile phones or pager, PDA, or even newly inventive pager, mobile phones - PDA - PC joint devices. . The application can make flexible functional adjustments to suit the functionality of the device used by the user. The application can automatically perform the appropriate operations in place of the user based on the user-predefined option set and instruction set. The above functions will work together to greatly improve the production efficiency of users using computing techniques. According to the design, .NET makes users do not need to interact with the computer, so that the computer is fully entitled to make the computer to perform tasks and implement the final goal. By using an XML industry standard, user data can be easily implemented inter-site and applications to easily implement operations currently. For example: focus on the data there in several different banks, credit card companies, and billing agents; in this way, the user can report the cost detail to the bill. .NET will make the employee, the customer, and the business application, and the overall intelligence interaction, and each company will undoubtedly be the biggest beneficiary of this efficiency and productivity revolution. Briefly, .NET promises to create a business world that eliminates No Digong. 1.1.2.3 Basic modules for Microsoft .NET
Network service list
Usually, a network service is just a service-by Internet standard to integrate simple applications with other network services - released. In other words, it is a resource that can be automatically returned by the URL position to return information to a client that needs it. An important feature of web services is that the customer does not need to know how a service is implemented. In this section, I will explain how the network and network services combine the best aspects of component technology and describe the basic framework required to communicate with the network service. Like the same components, network services provide "black box" function, which can be used again without care how this service is implemented. The network service provides an exactly defined interface known as the contract, which depicts the service provided. Developers can integrate remote services, local services, and settled code together with integration applications. For example, a company can use the following services to build a online store: Microsoft passport (original: Passport) service to verify user identity, third-party personalized service to make the web page match each user's parameters, credit card processing service, sales tax service, Each shipping company's parcel tracking service, the internal directory service of the company's internal inventory management program, and a small number of fixed code to make their stores stand out. However, network services are different from the current components technology, which do not use specific object model protocols that need to be clear, the same type of basic architecture, such as DCOM, RMI, or IIOP. Although the implementation of the closely combined with specific components can be well received in a controlled environment, they become unrealistic in the network environment. Because a participant in an integrated business program will change, with time, technology is also changing, so it is very difficult to ensure a single, unified architecture between all participants. The network service has taken another way, which uses the network protocols and data formats of ordination, such as HTTP and XML, and communicate. Any system that supports these network criteria supports network services. Moreover, the network service contract describes the services provided in the form of the term packets, which are generated and accepted by the network service, not how the service is implemented. By putting the focus on the packet, the network service template is completely ignorant of the language, platform, and object templates. Network services can be achieved with any set of programming languages, object models, and platform fully characterized. The network service can be used in any platform that is implemented in any language. As long as the contract is recognized by the contract, the message sequence, and the desired agreement is recognized, the implemented network service and network service users can differ from each other without affecting the application of the other end of the session. The network service template requires low requirements to ensure that network services are implemented and accessed on the platform using any technical and programming languages. Solution to network service interoperability can only rely on network standards. However, in order to make the application easier to use network services, it is not enough to access network services through standard network protocols. When the network service and the network service user rely on the standard manner indicated data and commands, the network service is easy to use when calculating the capacity provided by the network service. XML is a standard, scalable language that is scalable for providing commands and typical data. Although the rules that use other techniques (such as a query string) can be defined for the representation of commands and typical data, XML is specifically designed to describe the standard meta language of the data. Simple Object Acquisition Protocol (SOAP) is an industrial standard that uses XML in an extensible manner to represent data and commands. Network services can choose to use SOAP to determine the format of the packet. XML is an enable technology of a network service contract. Service Contract Language (SCL) is an XML syntax for recording network service contract. Since the SCL is based on XML, it is easy to generate, interpretation of the developer and development tools.
The draft of SCL rules will soon be introduced (note: the current SOAP Toolkit for Visual Studio 6.0 supports an earlier version called SDL SCL). The DISCO specification describes a standard way for the service provider to publish a network service contract and the corresponding mechanism, which will enable developers or development tools to find contracts. When you read this, the draft DISCO specification should be introduced. The standards such as SOAP, SCL and DISCO help developers because they don't need to understand and implement the access method of each network service used. Support for these standards, fully tested, high-performance architectures will be provided by the development platform, which greatly simplifies the entire development process. Microsoft .NET Framework
The purpose of the Microsoft .NET framework is to make it easier to build web applications and network services. Figure 2 shows the system of the Microsoft .NET framework. Build the uppermost service of the operating system is a CommON Language Runtime for managing runtime code requirements. These codes can be written in any modern programming language. Runtime provides a number of services that help simplify code development and application development will also increase application reliability. .NET Framework includes a set of libraries that can be used by developers for any programming language. Above this is a number of application templates that provide advanced components and services to develop network sites and network services.
Common logage runtime
Running the language (Runtime) Tours and runs the code written in any runforce programming language. The code that runs as a target is called a control (Managed) code, and the controlled code code means that there is a defined cooperative contract between internal executable code and run itself. For tasks such as generating objects, calling methods, etc., is delegated to running language, which makes an additional service to executable code for executable code. Run language is characterized by integrated cross-language, self-description components, simple formulation, and versioning and integrated security services. Running languages use a new generic type system that expresses most modern programming languages, universal type systems define a set of standard types and regulations to generate new standards. Run language knows how to generate, perform these types. Compilers and interpreters use the running language service definition type, manage object, and method call instead of using tools or language-specific methods. The main design purpose of the type system is to integrate multiple languages. The code written in a language can inherit the implementation of the class written in another language, and the exceptions thrown by the code written in a language can be captured, like debugging and analysis of the code written by another language. The operations such as work are completely closed without considering the language used by the code. This means writing a reusable class developer, no longer need to generate a version for each programming language or compiler, and developers using class libraries are no longer restricted by the library developed for the programming language they use. . Self-description Components - Now the Microsoft .NET framework is possible - simplifies development and formulation, and improves the system reliability. Many services provided by the running language are driven by metadata and information for supplementary executable code. Because all information is stored together, only executable (code) is called self-description components. One of the main advantages of self-description components is that they do not require other files. The definition of the class does not require a separate header file; the definition of the class is obtained from the component itself by checking the metadata. Access components across language or process boundary do not require their respective IDL files, type files, or proxy / stubs; necessary information already exist in metadata. To identify the service properties requested by the developer, you do not need to expand your respective formulation information. The most important thing is that since the metadata is generated by the source code during the compilation process, it will always be synchronized forever and executable together with the executable code. In addition to improving the formulation of a single component, the MicroSFT .NET framework defines an application formulation template to solve the problem of setting the application installation and DLL version (usually referred to as "DLL Hell"), running the language Support this template service. The MicroSft .NET framework introduces the concept of the assembly. A assembly is a set of resources and types, including metadata related to these resources and types, that is, as a unit. Metadata is referred to as a list of assemblies, which contains information that can be seen from outside of the group and the resource table, which also includes information about the dependence, such as the version number when the assembly is established. Developers can specify version strategies to indicate whether running language is loaded into the system installed on the latest version of the assembly, load a specified version, or the version used in compile. Multiple copies of a software component can exist on the same operating system, however, usually, only one copy energy is registered by the operating system, transferring memory, execution. The strategy for positioning and transferring memory is global. The .NET Framework Common Language Runtime adds the necessary architecture to support each application policy that is positioned and tested in the management component, which is often referred to as parallel formulation. The assembly can be privately owned by an application or shared by multiple applications. Multiple versions of a combination can be formulated simultaneously on the same machine. The application formulation information defines where to find the assembly, so that Runtime can load different versions of the same composition for two different applications running simultaneously. This eliminates the problem caused by the incompatibility of the component version and improves the overall stability of the system.
If necessary, if necessary, administrators can add formulation information to the assembly of the formulation, such as a different version policy, but the original information provided at compile will never be lost. Since the composition is described herein, it is not necessary to explicitly register on the system. The application is simple to copy the file to the directory (if the application can be operated), the situation is slightly more complicated. The formulation information is saved in the XML file edited by any text editor. Finally, the running language also provides complete, universally in-depth security services to ensure that unauthorized users cannot access resources on the machine, and the code does not perform unauthorized action. This improves the safety reliability of the system. Since the running language is used to load code, generate objects, execution method calls, so when the controlled code is loaded, the operation is functional, and the security policy can be enhanced. The MicroSft .NET framework not only specifies the code access security, but also the role-based security. Through the code access security mechanism, developers can specify the permissions necessary for the application to complete the work. For example, the code may need to write a file or access the environment variable. This type of information is stored on the formulation level together with information about the code logo. When the code is loaded into the memory and execution method call, run the language verification to give the code required by the language. If you can't, a secure conflict information will be recorded. Give permission, this is called a trust policy, which is built by the system administrator and is based on the evidence about the code, such as: the code is released, it is obtained from where it is obtained, and in combination The code logo found in the body and the permissions it requires. Developers can specify privileges they obviously do not need to prevent other people from maliciously using their code. If the required permissions are dependent until the time you want to run, you can write into the adjacency security check. In addition to the code access security, the running language also supports role-based security. The role-based security establishment of the same code access security is the same, but these permissions are built on the user's identity, rather than being built on the code. The role indicates the class to which the user belongs, and can be defined in the development and formulation phase. The policy given is assigned to each predefined role. At runtime, the user's identity is determined, and the code will be running on behalf of this. The running language determines which role of the user, then gives the permissions based on this role. Let's take a look at the service it provides before viewing the programmable template of the Microsft .NET Framework. The Serving Framework is a Service Framework on the Common Language Runtime. This framework provides classes that can be called by any modern programming language. All classes follow a set of naming and design guidelines to greatly reduce the development of developers' learning. The framework includes a base library that developers want to exist in a standard language library, such as collections, input / output, strings, and data classes. In addition, the base library provides access to operating system services such as drawings, networks, threads, globalization, and encrypted classes. The service framework also includes data access class libraries, and development tools such as debugging and profiling services. This article has not discussed all classes in detail, I will focus on the data access class because most network services need to access data. Of course, you can find additional information about the service framework class library in Microsoft .NET Framework SDK.
Data Access Service Almost all network services require query and update permanent data, whether in simple files, or in related databases, or other storage types. In order to provide access to data, the service framework includes ActiveX Data Objects (ADO.NET) libraries. As in the same name, ADO.NET is developed by ADO. ADO is designed to provide data access services based on network-based scalable applications and services. ADO.NET provides high-performance APIS streams for connecting pointer style, while providing high-performance APIS streams for unconnected data templates that return data to client applications, as in later introduction. Like the remaining parts, ADO.NET defines those link data warehouses to send commands to the data warehouse and get the results from which results are obtained. These classes are implemented by the Managed Data Provider. The link and command objects in ADO look like the ADO, and a new class named DataReader provides the ability to get results through high performance API streams. DataReader is equivalent to the forward and read-only ADO record sets, but DataReader is designed to minimize the number of objects generated in memory to improve performance and avoid spam accumulation. In the .NET Framework contains controlled data providers for Microsoft SQL ServerTM, any data warehouse accessible via OLE DB. A main innovation of ADO.NET is introduced into a Dataset. A dataset is a cache that provides a data relationship diagram in memory. Data sets do not know about the data source, which can be generated by a program or by transferring data from a data warehouse. Regardless of where the data is obtained, the data set is operated by using the same program template and it uses the same potential data buffer. Developers using the .NET platform can use the data set to replace the unconnected record set in the traditional ADO. The controlled data provider discloses a DataSetCommand interface object for the data warehouse and data set. DataSetCommand uses the ADO.NET link and command to populate the data set from the data warehouse and resolve changes in the data set to the data warehouse. Like DataReaders, the XMLReaders displays the stream access to XML data, like DataReaders. Developers use DataNavigator to scroll and edit the XML document in memory. DataNavigator is the same as W3C Document Object Model (DOM), but it is more efficient, and provides object templates that can map relationship data tables. DataNavigator supports XPath syntax to navigate the data stream. ADO.NET provides an XMLDocument class for developers who wish to continue using DOM as an XML object template instead of using more efficient DataNavigator templates. Since all data can be seen as XML, developers can use conversion and confirmation services for any data. ADO.NET defines a consumer DataNavigator to generate a new XMLReader's universal conversion system. The .NET Framework provides a special conversion component that supports the W3C XSL Transformations (XSLT) rule. ADO.NET also provides a confirmation engine using XML diagrams to confirm the XMLReader. ADO.NET supports a simplified map defined by DTDS, XSD or XDR. Form Application Template
From the concept, the top of the service frame is the top is two application templates: Windows Application Templates and Network Application Templates. Although I will focus on a way to develop Microsoft .NET frameworks to develop network services and web applications, the framework can also be used to develop more traditional Windows-based applications (of course, these applications can also use the network. service). Developers who write Windows client applications can use WINFT application templates to utilize Windows rich user interface features, including new features of the current ActiveX control and Windows 2000, such as transparent, hierarchical, floating windows. You can choose a traditional Windows or network appearance. After you know that the Similarity of Windows-based single packages is now, developers will find that WINFT programmable templates and support for design phases are very intuitive. The WIN form uses the MicroSft .NET Framework Runtime to reduce the overhead of Windows-based client applications. As long as the applications and components are written in WIN or by the WIN form application, they can be implemented safely on the client by the Frame Security Template. If you use or execute in this way, someone does not destroy the formulation information and data from the Internet to the Internet, otherwise it will automatically send each person in the user address. Email. The MicroSft .NET Framework Assembly Template simplifies the formulation and version of the application. Applications can be formulated to use their shared components used in compilation and testing, rather than using components that just install it just on the client machine, which improves the application's reliability, reduces the application supported by the application. The main factor: the user interface control and other shared component version of the incompatibility. Network Application Template
Build a web application to share a general application template on a MicroSFT .NET framework. In this model, the web application is a URLS originated from the base URL. So it contains web applications and network services used to generate web pages viewed in the browser. In this section, I will detail the web application programmable template called Active Server Pages (ASP.NET). As you guessed from the name, ASP.NET is developed by the active server page. ASP.NET provides a reliable, automated, scalable host environment with the Common Language Runtime and Services Framework web applications. ASP.NET also benefits from the CommON Language Runtime integrated template to simplify the formulation of the application. In addition, it provides services to simplify applications (such as status management services) and high level programming templates such as ASP.NET Web Forms, and ASP.NET Web Services. The core of ASP.NET is HTTP running language, a high-performance system for handling the operating language based on the HTTP request based on the low-level structure, while the ISAPI structure provided by Microsoft Internet Information Services (IIS) is similar. As you can see in Figure 5, the HTTP running language is a controlled code running during the unmanaged host in the IIS or client on the server. HTTP runtime is responsible for processing all of the introduced HTTP requests and parsing each request application, and then assigns the request to the application for further processing. The HTTP running language is multi-threaded, and is an asynchronous processing request, so the inferior application code hinders its processing of its new request. Moreover, HTTP operation language assumes failure will occur, so it is controlled to automatically recover from access conflicts, memory leakage, and deadlocks. Unless it is a hardware failure, the goal of running the language is 100% reliability. ASP.NET uses a component-based MicroSFT .NET framework to formulate templates, so it obtains advantages such as XCOPY formulation, component parallel formulation, XML formulation. Another main advantage of ASP.NET is that it supports real-time updates for applications. The administrator does not have to turn off the web server or even stop the application's run can be updated. The application file will never be locked, so the file can be overwritten even when the program is running. When the file is updated, the system is gently converted to a new version. The system detects the file change, and establishes a new application instance with the new application code, and then routes the introduced request to the application. This instance is destroyed when all unfinished request processing processed by the existing application instance. In the application, the HTTP request is a pipeline from the HTTP module, and finally arrives at the request handler. The HTTP module and request handler are some controlled classes that implement special interfaces, and these interfaces are defined by ASP.NET. This pipe structure makes it easy to add services to the application: just add an HTTP module. For example, security, state management and tracking are implemented as an HTTP module. Advanced programmable modules, such as network services and network forms, are often implemented as requested processing programs. An application can link a plurality of request handler - one URL per handler, but all HTTP requests are passed through the same pipeline route. The network is basically a stateless model, and there is no connection between HTTP requests, which makes it difficult to write network applications because applications often need to maintain a state across multiple requests. ASP.NET enhances the status management services introduced by ASP to provide three types of states for web applications: applications, sessions, users. Like the ASP, the application status is specific to an application instance and will not last. The session status is a session specific to a user and an application.
Unlike ASP sessions, ASP.NET session status is stored in a separate process and can be formulated into a separate machine. This makes a session state useful when the application is extended in the web farm. The user status is similar to the session state, but it usually does not time out and is permanent. Therefore, the user state is useful for the storage user parameters and other personalized information. All state management services are implemented as an HTTP module, so they are easily added to the application pipeline or removed from it. If additional status management services are required in addition to the services provided by ASP.NET, you can be provided by a third party module. ASP.NET also offers high-speed buffer services to improve performance. Output buffer fully saves web page translation, block buffer storage section. Since the corresponding class is provided, the application, the HTTP module, and the requesting handler can store any number of objects in the cache. Bring quickly browsing two advanced programmable modules that are built on the ASP.NET programmable module: ASP.NET network form and ASP.NET network services. ASP.NET network form
The web form brings the high-productive advantages of Visual Basic® form to the development of network applications. The web form supports the traditional ASP syntax that combines HTML content with the angle code, but it proposes a more structured method for separating application code and user interface content. The introduced network form control is used to provide a mechanism for the encapsulating universal user interface element. These new features allow the development tool to support the VB applet, which also supports design-time modules, so that the Wusiwyg tool supports webline layout. The network form control is responsible for generating a user interface, typically in the HTML form. ASP.NET is a network form fence that maps traditional HTML user interface widgets (including list boxes, text boxes, and buttons) and a set of additional more complex network controls (such as calendar and advertising transfer). An important feature of these controls is that they can be written to accommodate the ability of the client; the same web page makes a wide range of client platforms and form factors. In other words, the network form control can "sniff" to the customer who is looking for the form, then returns the appropriate user experience - may be HTML3.2 suitable for the low-level browser or a dynamic HTML suitable for IE5.0. Considering the network is a stateless coupling model, a very complex problem facing network application developers is that they have to respond to the user's interaction based on the network-based interface. The Internet uses ASP.NET architecture with a wide range of services to help developers build interactive web pages. The net effect of these services is to make american-based, event-driven programmable module, a form of a form of a client-based programming. The complexity of the status management of the user and the web page interaction is hidden by the ASP.NET network form and the network form control. For developers, the rich data binding service provided makes it easy to display data obtained by data access services. The separation of code and content allows the ASP.NET web page to dynamically compile the control class to improve performance. Each introduced HTTP request is passed to a new web page instance, so the developer does not need to care about thread security in the code.
ASP.NET network service
The ASP.NET network service architecture provides a Advanced Programmable Template for the establishment of network services with ASP.NET. Although network services do not need to use a network service platform, it provides a number of advantages to simplify the development process, and its programming model is very familiar with developers working with ASP or VB. Using this programmable model, developers don't need to understand HTTP, SOAP, or any other network service specification. Developers use ASP.NET to generate an extension-called .asmx file, and formulate this file as part of the network application, establish a network service. ASMX files or include references to controlled classes defined elsewhere, or contain definitions of this class. This class is derived from the WebService class provided by ASP.NET. After the public class method is marked, it will become a network service method, and the HTTP request is sent to the URL in the ASMX file, and these methods will be called. You don't have to manually build a contract for your network service. When requested by the caller, the ASP.NET checks the class's metadata to automatically generate SCL files. Customers can submit requests via SOAP, HTTP GET, and HTTP POST. The convention for encoding methods and parameters is: to the HTTP GET, will be encoded as query strings; HTTP POST will be encoded as form data. The mechanism of HTTP GET and HTTP POST is not as strong as SOAP, but they do not have to support SOAP when accessing to web services. The ASP.NET network service model assumes a stateless service structure. The stateless structure is usually more scalable than the state structure. After receiving a service request each time, a new object is generated, the request is converted to a method call, and the object is destroyed when the method call returns. If these services need to be maintained across, they will use the ASP.NET status management service. ASP.NET-based network services run in the network application model, so they get all security, formulation, and other advantages of the model. The ASP.NET network service also provides a managed proxy tool for a classification for network services described in the SCL file. The proxy generator maps the message described in the SCL file into a method in the controlled class. The agent hides all the network and boot devices for the application code, so using network services seems like using other controlled code. The agent will prioritize the SOAP link network service, but it also supports the HTTP GET and HTTP POST mechanisms. Therefore, HTTP GET and HTTP POST can also be used. Network Services provides a simple, flexible, flexible, multi-standard model that uses the existing architecture and applications on the Internet binding application on the Internet. The web application is easy to integrate with local development services or existing services without considering the development platform, developing language or object models to implement any composed of services or applications. The Microsft .NET Framework provides an application template and key technologies above the existing developer skills to simplify security, reliable, scalable, high availability network services, deployment, and constant development. Through the above introduction, we can feel that Microsoft .NET will have a huge impact on our future programming. 1.1.3 ASP.NET History We take the ASP before telling the history of Asp.net history. The first version of ASP is a 0.9 beta version. It brings a hit to the Web development, which can embed the code directly into HTML, making the design web page easier, more powerful, and through the built-in components to achieve powerful features, the most obvious is ActiveX Data Objects (ADO), It makes it easy to build a dynamic page as simple as children play games. The final appearance is Active Server Page 1.0, which is sent free of charge for IIS. And soon, they are widely used on the Windows platform.
The combination of ASP and ADO uses developers easy to create and open a recordset in a database. This is not undoubtedly, it is so fast, because you can now use these scripts to build and open a recordset, process, and output any data, in any order, almost as long as you can think of, it can be completed. In 1998, Microsoft issued ASP 2.0. The ASP 1.0 and ASP 2.0 mainly distinct the external components need to be instantiated. With ASP 2.0 and IIS 4.0, we have possible establishing ASP applications, and each component has its own memory space. Built-in Microsoft Transaction Server (MTS) is also easy to use the system. Microsoft then developed a Windows 2000 operating system. This Windows version gave us IIS 5.0 and ASP 3.0. This time is not simple to supplement ASP, the core is different, and there are many things to give COM. In Windows 2000, Microsoft combines COM with the COM core environment, which makes the host have a new way to use components, and bring more stability to the host, which can be upgraded. High efficiency work platform. IIS 5.0 does not seem to have changed on the surface, but the operation on the interface is relatively large. Internally, it uses the COM component service to provide a better implementation of the component. With these, Microsoft launched ASP.NET, ASP.NET is also called Asp.net, he is not a simple upgrade of ASP, but a new generation of Active Server Pages in Microsoft. ASP.NET is part of Microsoft's new system knot. Net, which makes everyone's programming life is more simple 1.1.4 Summary in this chapter, we introduced the history of Microsoft .NET, And a detailed introduction to .NET composition, performance, and we also introduce the history of ASP.NET in detail. In the following chapter, we will explain the ASP.NET by step by step.
Chapter 2. NET installation and operating environment
1.2.1 Operation Environment Configuration ASP.NET debugging environment operating system: Windows 2000 Professional, Windows 2000 Server, Windows 2000 Advanced Server Browser: IE 5.5 NGWS
Which language ASP.NET can support three kinds of languages, C # (read "C Sharp"), Visual Basic, and JSCrip. Make your machine ASP.NET, must meet the following configuration: Hardware requirements: 1, CPU: Intel Pentium II-Class 300 MHz (best Intel Pentium III-Class 600 MHz) 2, memory: 96 MB (best 128 MB) 3, disk space: 250 MB (fully installed) 155 MB (quick installation) 4, show: 800x600, 256 Colors 5, CD-ROM: Required
Software Requirements: 1, Microsoft Windows 2000 SP12, Microsoft Internet Explorer 5.5 3, IIS5.04, Other: MDAC 2.6 Beta 2
Is .NET is a running library or a development platform?
Microsoft's grand goal is to let Microsoft.net thoroughly change the software development, release methods, way of use, and more, but not for Microsoft, but to all companies! The ".NET architecture" package, ". NET architecture" is the first part of the Microsoft.Net program, including two components: "NET universal running library" and ".NET class library". Recently, good news said that the two components have been packaged in ".NET architecture SDK", put them on Microsoft's station for free for everyone to download, interested friends must try it! In addition, this SDK also includes a command line compiler of C #, C , JavaScript, and VB. Use these compilers to develop applications and components. From this perspective, .NET architecture first is a development platform because it Provide run libraries and class libraries, and, the next is about Visual Studio.NET, including more comprehensive SDK and graphical development interfaces, wizards, tools, etc., more like a development platform. However, the .NET running library has actually been integrated into the operating system, so it is also possible to run the run. What is NGWS?
ASP.NET is actually part of a new running structure that provides support for all Windows applications. This structure is the Microsoft's NEXT GENERATION Web Services (NGWS) assigns section. When you have this structure, you get an ASP.NET. This structure also supports all other server program technologies. The NGWS structure expands the structure of COM by adding [new and enhanced service] to upgradeable distributed applications. This structure is commonly used to prepare a co-useful software components that can be repeatable. These new and enhanced services are: A unified list of unified libraries that support multi-language running engine simple application establishment, commissioning, and maintenance of distributed applications have enhanced upgradeability protection for existing software and investment
In ASP.NET introduced the concept of Namespace, what is Namespace? Objects have always been the center of program development in the Windows development environment. Regardless of VB, VBA, VC , Vbscript, etc., different development environments have different objects, all of which are "resources" provided by each syntax, and program developers can use these resources to write the required The system is like we are in the house, the architect uses the same material, however, the covered house may not be the same. In the past SP, there are only seven objects such as Server, Request, Response .... And in ASP.NET's object library is very fine. For example, in the ASP.NET web page, you must use the data in the database through the SQL statement, you must use "System.Data.SQL", which is the namespace name. There are many classes (CLASS) under System.Data.sql. Each class can be seen as an object because there is attributes, methods, and events under the Class, the uppermost Namespace is a collection of similar types of objects, and a Namespace can have multiple Class. The relationship between them is as follows:
Through this figure, we understand the concept of Namespace and Class, which is an object collection and object, respectively.
How do I apply the namespace (Namespace)?
<% @ Import namespace = "system.globalization"%> <% @ import namespace = "dataemployee"%>
<% @ Import namespace = "system.data"%>
<% @ Import namespace = "system.data.ado"%>
The above means that four Namespace used in the ASP.NET web page, follows us to declare variables, but this variable must be the class of four Namespace belongs, such as:
DIM MyConnection as adoconnection
Dim MyCommand as adodatasetcommand
Note: Adoconnection and AdodatasetCommand are Class under System.Data.ado.
Document type in ASP.NET?
The file type of ASP is only one, its extension is .asp file. Then there is a lot of file names in ASP.NET:
File extension Use and Description Global.asax ASP.NET System Environment Settings File, is quite Global.asa in ASP. .aspx contains files containing ASP program code, such as past .asp, browser can perform such files, browse requests to the server. SASMX Making the original file of Web Service. SDL Making Web Service XML format file
VB or .CS In a non-ASP.NET environment, execute web service files .ASPC overlap the files in multiple .aspx files, this file can contain control .ascx's file containing user control, can be included Multiple .ASPX files.