What is it ASP.NET. Installation and test project.


Microsoft .NET Framework is a platform for creating, deploying, and running Web services and applications. It provides a high-performance, standards – based, multilingual environment that allows you to integrate existing applications with next-generation applications and services, as well as solve the problems of deploying and using Internet applications. .The NET Framework consists of three main parts : the common language runtime, a hierarchical set of unified class libraries, and a component version of ASP called the common language runtime. ASP.NET.

ASP.NET – it’s part of the technology .NET, used for writing powerful client-server Internet applications. It allows you to create dynamic HTML. ASP pages.NET was created by combining the older technology ASP (Active Server Pages) and .NET Framework. It contains many ready-made controls that you can use to quickly create interactive websites. You can also use the services provided by other sites transparently for users of your site. In general, the features are ASP.NET limited only by your imagination.

Let’s discuss what dynamic HTML pages are and how they differ from static ones. A static page contains code in the hypertext markup language HTML. When the author of a page writes it, he determines what the page will look like for all users of the page. The page content will always be the same regardless of who decides to view it and when. The HTML language is quite sufficient for displaying information that rarely changes and does not depend on who is viewing it. The HTML page is plain ASCII text, so the client can run on any operating system.

It is quite clear that if you create a web page by describing its structure using HTML, it will be completely static in terms of content. In other words, when viewed in a browser, it will contain exactly the same information that was recorded in it at the time of creation, and the data transmitted by the user cannot be used to modify the content of the pages displayed to him: he will only be able to see what was previously recorded in the final set of files.

But what if we want to display the current euro exchange rate or weather forecast on the page? If we wrote an HTML page yesterday, it will be outdated today. Therefore, we should be able to create dynamic pages. Dynamic content of a page is information whose content is determined by who it is intended for, and which differs from view to view. It allows for two-way information exchange – from the client to the server and back.

Dynamic web pages are usually referred to as web pages that go through a processing cycle on the server before being sent to the client. In the simplest case, it can be some program that modifies static pages requested by the client, using the parameters of the received request and some data storage. Even with such a primitive organization ,the “unsolvable” problem from the previous paragraph finds an obvious solution: it is enough to prepare just one static page-a template-and before sending the page programmatically substitute the value received today from the bank or the weather bureau.

Most of the pages in the early stages of Internet development were static. The number of dynamic pages has been growing over the past 10 years. And this is understandable, Internet users want not only to read ready-made information, but also to be active actors. For example, they order products from an online store, write diaries, and participate in contests. Information portals update news every minute. Dynamic pages can adapt to a specific user, as well as respond to their actions in the browser. In what way? Many technologies have been developed for this purpose. For example, in order to identify the user and save their settings for this site, cookies are used.

There are languages that can dynamically change the content of a web page. On the one hand, these are scripting languages that run directly from the client. Examples of scripting languages are JavaScript and VBScript. Scripts in these languages are embedded in the HTML code that the server sends to the browser. Client-side scripts are marked with the and tags . The browser interprets this code and shows the result to the user. The code itself can be viewed via the browser’s View Source. Naturally, these programs cannot be large. For example, if you need to perform a search in a database, we can’t send all of its contents to the user. However, scripts can check the correctness of the request entered in the form, so you don’t have to restart the server processing incorrect requests. Some programmers create animation effects in JavaScript. One student intuit.ru I wanted to find a script that would send SMS messages. Alas, this is not possible. Client-side scripting is not enough to create full-fledged dynamic pages. Even if the page uses JavaScript, animated images .gif, it is called static.

A dynamic web page must be created on the fly by a program running on an Internet server. The CGI(Common Gateway Interface) gateway mechanism is widely used. First, the user gets a static page with the form. You know that the FORM tag has an ACTION attribute. It sets the address (URL) of the executable application. The server contains executable files of programs written, for example, in C / C++ or Delphi, which use the HTTP protocol to accept data from the input stream or from environment variables and write the finished page to the standard output stream.

In response to the request, the user is sent an HTML code that was specially generated for them. This can be, for example, the result of a search in a search engine. CGI scripts can be written in an interpreted language (Perl) or even a command-line script. The input and output streams are reassigned. The Internet server accepts data entered by the user as input. After processing the received data, the resulting page is returned to the user. When the cgi program is executed, it is loaded into the server’s memory, and when it is finished, it is deleted. When 100 clients access the server at the same time, 100 processes are created in memory, and each process needs memory to store its code. This has a negative impact on scalability. Recall that scalability is the ability to smoothly increase the response time of a software system to a request with an increase in the number of concurrent users.

To solve this problem, Microsoft offered an alternative – ISAPI (Internet Server Application Programming Interface)-extensions and filters. Instead of executable files, DLLs are used. The DLL code is in memory all the time and creates threads of execution for each request, not processes. All threads use the same programming code. The ISAPI application runs in the IIS server process. This improves performance and scalability.

You can create ISAPI extensions in Visual Studio C++ 6.0 using the wizard.

ISAPI also has some drawbacks related to development. If we change the source code of a dll, we must compile it and put it in the executable directory of the server. However, since the previous version of the dll is still in memory, you must stop the server to get access to change the file. At this time, clients will not be able to receive any documents from the server, and, of course, they will not be satisfied.

Server-side scripting languages-php and asp. ASP technology was developed by Microsoft in the 90s.

ASP code execution is supported by the ISAPI server extension. The IIS Server Configuration dialog defines how to handle files with different extensions. To process a URL with the extension, a file is defined in the server settings asp.dll. ASP files are sent to it for processing. The input is asp, and the output is a stream of HTML code.

Example of an asp file:

<%@ Language=VBScript %> 
 <% Option Explicit%> 
 <META HTTP-EQUIV="Content-Type" content="text/html"> 
 Hello ASP World! 
 Dim i; 
  for i=1 to 5 
 Response.Write(“<FONT SIZE=” & i) 
 Response.Write(“>This code generates ASP!</FONT>”) 
 next i 

The <%tag…%> signals the asp that it contains code that it should process on the server. The script is executed in the language specified in the Language directive. The Response operator.Write writes text to the server’s output stream, so it becomes part of the HTML page sent to the user.

ASP technology was limited in its capabilities. He used scripting languages, which have fewer features than full-featured programming languages. The asp code was embedded in HTML as special tags, which created confusion. Pieces of asp were scattered across it like raisins in a bun. But HTML code is usually created by designers who know how to “make beautiful”, and asp programmers who make it all work. In ASP.NET you can keep asp and HTML code in different files.

Scripting languages do not support strong typing. What does it mean? You don’t have to describe a variable before using it, and you can assign values of different types to it. This is convenient, but creates the potential for mistakes. For example, you have a variable x1, and you assign it the value 1, but you made a typo and mistakenly wrote x2=1. A new variable x2 will be created, but the value of x1 will not change. In a strongly typed language, the compiler notices that the variable x2 was not described, and returns an error.

In 2000, at the developer conference as part of a new technology .NET Microsoft introduced ASP+. With an output .NET Framework 1.0 it became known as ASP.NET.

ASP.NET – this is not a continuation of ASP. This is a conceptually new Microsoft technology created within the framework of the .NET ideology. In ASP.NET everything is laid out to make the entire web application development cycle faster and support easier. ASP.NET It is based on object-oriented technology, but retains the asp development model: you create a program and put it in a directory allocated by the server, and it will work. In ASP.NET many new features have been added, and the existing ones in asp have been significantly improved.

In ASP.NET compiled languages are used. During compilation, the source code is checked for syntactic correctness. Code compiled into an intermediate language is faster, and it will be the same regardless of the language we use. Compiled languages support strong typing.

Compilation takes place on the server when the user first accesses the page. If the programmer has changed the page text, the program is recompiled automatically. When writing code, you can use a set of components that come with .NET.

The platform .The NET Framework provides applications with a runtime environment that directly interacts with the operating system. Above is the interface ASP.NET applications, on which web forms are based in turn (ASP.NET pages) and web services. The interface .The NET Framework allows you to standardize access to system calls and provides an environment for faster and more convenient development. The CLR provides a single set of services for all languages.

ASP.NET uses data access technology ADO.NET, which provides a single interface for accessing SQL Server databases and XML files. In addition, the enhanced security model allows you to protect the client and server from unauthorized access.

In 2004, a new version was released ASP.NET 2.0 (beta version, final release-late 2005-early 2006). It is claimed that this version allows you to reduce the amount of encoding by 70%. New features of version 2.0 – for example, the use of page design templates(Master Page), simplified localization of Web applications, more than 50 new server controls. The goals of the new version developers were to increase the speed of site development, scalability, ease of site support and administration, and server speed. The MMC ost Settings panel (Microsoft Management Console) has been added, providing a graphical interface for managing settings ASP.NET. You can now also change project settings via the web interface. ASP.NET 2.0 supports 64-bit processors. The personalization service provides a ready-made solution for storing personal data that directly characterizes the site user, the so-called user Profile.

Design templates, themes, and skins allow you to design the entire site separately from its functionality. Themes include graphics and cascading style sheets.

Previous versions of Visual Studio for projects ASP.NET required the availability of an IIS server on the developer’s machine. The server is now embedded in the development environment.

ASP.NET 2.0 and Visual Studio 2005 provide tools for easily building localized sites that determine the user’s preferred language and send them pages in their language.

The precompilation feature allows you to detect errors before pages are uploaded to the server. You can choose not to store aspx source pages on the server, thereby protecting your intellectual property.

In ASP.NET 2.0 built-in technology for automatic updating of database caching. The data received from the database is stored on the server and it does not access the database to process a repeated request. When the database changes, the cache updates its contents.

ASP.NET – this is a technology, not a language, and allows you to program in different languages – C#, Visual Basic, J#. In the platform .NET all languages are equal, but some are more equal. Orwell). That’s what C# is, because it was created specifically for this platform. C# programming makes full use of the concepts, techniques, and patterns of object-oriented development. Visual Basic 8.0 has almost the same features. To learn ASP.NET you need to know the basics of HTML, and knowledge of asp is not necessary. It may even interfere, as you will have to change your way of thinking. Also, to understand many of them, it is desirable to know CSS and JavaScript.

Installation process

ASP .NET 2.0 can be installed on computers running Windows 2000 with Service Pack 4, Windows XP with Service Pack 2, and later versions of Windows. It is preferable to install ready-made sites on Windows Server 2003.

You can use any development environment or even a text editor to develop your application, as long as you have access to IIS. If you want to take advantage of the full power of Microsoft .NET Framework and ASP.NET and at the same time, spend as little effort as possible, then you need to use a development environment specially designed for programming ASP.NET 2.0.

If you purchase Visual Studio .NET 2005, then only it will be enough to work. .The NET Framework is contained on disks. It includes Visual Web Developer, which allows you to create professional web applications, as well as desktop applications in different programming languages. Microsoft products are released on DVD, but there is a set of two CDs from Megasoft. Visual Studio .NET 2005 requires about 2 gigabytes of disk space. At the same time, it is installed ASP.NET 2.0, development environment, SQL Server Express, embedded web server, Crystal Reports with special controls for ASP.NET 2.0.
Software distributed for free.

Visual Web Developer 2005 Express Edition – a freely distributed environment designed for beginners and students, available at http://msdn.microsoft.com/vstudio/express/vwd/. List of differences between VWD and Visual Studio.NET The list is small and insignificant for beginners, it is given here: http://msdn.microsoft.com/vstudio/products/compare/default.aspx

The VWD installer has a capacity of 2.8 MB, but during the installation process, it will download another 40 MB and 80 MB if you want to install the documentation. It will also be installed .NET Framework with ASP.NET 2.0.

System requirements – processor with a minimum speed of 600 MHz, 128 MB of memory and 1.3 GB of disk space. After installation, you will need to register your installation, it is completely free.

You can choose WebMatrix as your development environment. This program combines an editor and an http server. You can upload it to http://www.asp.net/WebMatrix.

WebMatrix has an installer that is only 1.2 MB in size, but it has fewer features than VWD. But, in general, these development environments are similar. WebMatrix has an unpleasant feature – it gives you a request to save files that were not edited during closing. VWD Express allows you to open the Web-based project configuration interface with a single click of a button. VWD uses IntelliSense technology, which automatically suggests possible code elements in a given location.

If you decide to work with WebMatrix, you must install it on your own machine .NET Framework 2.0 and ASP.NET 2.0.

If you have a Windows Server 2003 operating system, then .NET Framework is already pre-installed. You can check if you have the %WINSDIR%Microsoft.NetFramework directory. If not, you can download it from the Microsoft website. The latest versions are available at http://msdn.microsoft.com/netframework/downloads/updates

At the moment it is .NET Framework 2.0, but by the time you read this lecture, newer versions may be available. You can download the new version even if you already have another one. They will exist on the computer at the same time in the %WINSDIR%Microsoft. NetFramework subdirectories, with the name corresponding to the version number. You can say that each version is an assembly. The version system is supported for all applications created using .NET Framework.

There you will see links to .NET Framework for different computer architectures.

If desired, upload it .NET Framework Version 2.0 SDK, which contains along with .NET Framework Version 2.0 SDK documentation and examples that you may find useful.

By address http://asp.net/default.aspx you can find many useful software product developers, code examples, and articles.

IIS (Internet Information Server) is located on the Windows 2000/XP installation disk, but it is pre-installed only on servers. You can install it by going to Control Panel->Add or Remove Programs-> > Add / Remove Windows Components. Your computer will ask you to insert the installation disk.

You may need IIS if you need a full-fledged server to work on the Internet, and not just on your computer or on a local network, or you decide to type text in a regular editor. To work on your own computer, all of these development environments have a built-in Cassini server, which originally appeared as part of WebMatrix. The WebMatrix symbol is the planet Saturn, and Cassini is a famous Saturn explorer. Previous versions of Visual Studio required IIS, but now Cassini is also built into Visual Studio 2005, which allows you to work even in Windows XP Home Edition.

Leave a Reply

Your email address will not be published. Required fields are marked *

You May Also Like