My ASP. NET journey _ basic knowledge & installation and running environment

Source: Internet
Author: User

WebsiteThere are two main points (also becoming a Web site):

    • Use (Enterprise Intranet is an application of Internet technology in enterprises.) Or the Internet.
    • Must pass WThe EB server sends data (the key point here is "Web server ").

Data on the website is stored as web files.Form StorageIn.

The following steps are taken to establish a website::

Upload or default. aspx. Then, put all these files into the default web publishing directory of the Web server (such as IIS). The default web publishing directory is also the main directory, IIS InstallationProgramThe default location is c: \ interpub \ wwwroot.

If the network has DNS, visitors only need to enter the computer name to access the site. this is to apply for a domain name for the Internet, such as www.yahoo.com. if the DNS function is not available, visitors must enter the computer's Digital IP address, and many internal networks do not have DNS.


Basic working principles of Web Applications

A Web application is a collection of HTML files and other resource files. A web site can contain multiple web applications, which are located on a server on the Internet. A web site corresponds to a Web server ).

A Web server is actually a computer software connected to the Internet. It is responsible for text requests submitted by web browsers. if you are connected to the Internet through an ISP (Internet Service Provider), the ISP will provide you with a web server.

A browser is a tool for reading and browsing the Web. It displays information on the screen in C/S mode with the Web server. just as you can see a picture on a TV, a browser is added with a software that allows users to browse Web information, but the information is sent by the Web server. the entire process can be summarized as follows:

















Basic working principles of ASP. NET network applications

The application server is different from the Web server. After the application server is installed, the ASP Application Server (note that this is an Application server) will work with the Web server. A request for a webpage with an ASP extension. the browser will send this request and pass it to the appropriate web server containing the requested page; the Web server searches for the request page on its own system to identify the request. ASP extension, and pass the entire page to the ASP application server for execution.

If no ASP Application Server exists, the web server sends the entire page back to the browser and processes it as HTML, which will result in ASP being returned to the user's browser as text. If the requested webpage is not found on the Web server, the server returns the "HTTP 404 error-page not found" message.

Assuming that the server exists and works properly, ASP interpretation engine will browse this page and look for the <%> tags, which convert these tags into the requested HTML. Once all ASP labels are processed and converted, the whole page is returned to the Web server. The web server packs the web page and now only contains HTML tags and sends them to the user as a response.

This is why the browser will never see the <%> syntax tag and its intermediate definition ASPSource codeAnd, if you view the source of the ASP Web page displayed on the browserCode, You can only see HTML. In this way, the Web can respond to possible changes made by users and dynamically create webpages to respond to received data. The entire process can be summarized as follows:

Here, an "ASP Application Server" is added. Because Microsoft binds the "ASP Application Server" to a Web server for installation, most users may confuse these two concepts.

We require users to master the Web server and Application Server concepts. If these two concepts are unclear, It is unimaginable to learn dynamic web page development well..


Install and set the running environment of ASP network applications

    • FirstInstall IISAnd thenInstall. NET FrameworkFinallyAspx file test(If. NET Framework is installed before IIS is installed, run --> cmd --> C: \ Windows \ microsoft.net \ framework \ v2.0.50727 \ aspnet_regiis.exe-I to configure IIS)

To develop network applications, you must first install a Web server. On Windows, there are many web servers available, including IIS (Internet Information Service) and Apache. If you develop a network application under Windows 98, you can install PWS (Personal Web Server), which is also a web server. Microsoft binds the ASP application server and the Web server. Therefore, when IIS and PWS are installed, the ASP application server is installed on the computer, and it is already configured.

Install IIS: In Add/delete programs --> Windows build wizard --> select IIS

Enter"Http: // localhosT "test whether IIS is successfully installed.


After selecting IIS, install it. NET framework, because winform has been developed before, so it has been installed. net Framework. in this case, you need to reconfigure IIS. Enter the following command in cmd to complete the configuration c: \ windows \ microsoft.net \ framework \ v2.0.50727 \ aspnet_regiis.exe-I

C: \ Users \ bigstone> C: \ WINDOWS \ microsoft.net \ framework \ v2.0.50727 \ aspnet_regiis.ex E-I


Create the first ASP. NET web page

Now you can put your ASP Webpage in the C: \ Inetpub \ wwwroot folder of the system disk.

 

  1     <%  @ Page Language  =  " C #  "  Contenttype  =  "  Text/html  "  Responseencoding =  "  Gb2312  "     %>  
2   <! Doctype HTML public "-// W3C // dtd xhtml 1.0 transitional // en" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" >
3   < Html Xmlns = "Http://www.w3.org/1999/xhtml" >
4   < Head >
5   < Meta HTTP-equiv = "Content-Type" Content = "Text/html; charset = gb2312" />
6   < Title > First ASP. NET webpage </ Title >
7   </ Head >
8   < Body >
9   <%
10 Response. Write ( " Hi, ASP. NET web page " );
11   %>
12   </ Body >
13   </ Html >
14  

 

The file name is test. aspx.


EnterHttp: // localhost/testIn this way, the first ASP. NET web page is completed

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.