How to configure ASP. NET on IIS

Source: Internet
Author: User

When deploying an ASP. NET Website on the server, the. NET runtime environment is required. NET Framework .. NET Framework is similar to the JDK of Java, including the. NET program running environment and command line compiling tool. If the. NET Framework is not installed on the server, this needs to be downloaded from the Microsoft website, download URL: http://msdn2.microsoft.com/zh-cn/default.aspx

Note that if you install. NET Framework before IIS, you need to run a command to register. NET Framework with IIS. This command can be found in the system partition. If the operating system is installed on the C drive and. if the NET Framework version is 2.0 or later, the path of this file is: C: \ WINDOWS \ Microsoft. NET \ Framework \ v2.0.50727 \ aspnet_regiis.exe

In the "run" window, enter "C: \ WINDOWS \ Microsoft. NET \ Framework \ v2.0.50727 \ aspnet_regiis.exe-I", as shown in figure 1-4.

Click OK to complete registration.

We may wish to further explore the server, run the IIS software, and open the "Internet Information Service" window from 1 to 5.

Figure 1-4 run the. NET Framework registration command to IIS
(Click to view the larger image) Figure 1-5 "Internet Information Service" Window

Right-click the "default website" node and choose "properties" from the shortcut menu to open the "default website properties" window from 1 to 6.

We can see eight tabs in total, they are website, ISAPI filter, Home Directory, document, Directory Security, HTTP header, custom error, and ASP. NET tab. This section describes several tabs that are commonly used for configuration.

(1) "website" tab: used to configure some common attributes, such as the port number and IP address used by the website. The default port number of the Web server is 80. If you are not familiar with IIS, we do not recommend that you modify the default port number.

(2) "main directory" tab: used to set the physical path and execution permission of a website or virtual directory, as shown in figure 1-7.

(Click to view the larger image) Figure 1-6 "default website properties" Window
(Click to view the big chart) Figure 1-7 "main directory" tab

You can also set application ing on the "home directory" tab. Click "Configure" to open the "Application configuration" window from 1 to 8.

As shown in figure 1-8, after IIS and. NET Framework are correctly installed, dynamic pages suffixed with. aspx can be handed over to the specified Script Engine for execution. Select the. aspx file and click "edit". A new window is displayed, as shown in figure 1-9.

As shown in figure 1-9, The. aspx page is executed by aspnet_isapi.dll. If a custom file type needs to be processed by the server, you can configure it here.

(Click to view the big chart) Figure 1-8 "application configuration" Window
Figure 1-9 "Add/edit application extension ing" Window

(3) "document" tab: used to set the priority between the website start page and adjust the website start page, as shown in figure 1-10.

The start page is a page opened by the Web server by default if no webpage is specified when a website or virtual directory is opened. For example, if we enter www.163.com in the address bar of the browser, although we do not specify which page on the server to access, however, the server uses a default order to open a specific page on the Web. This page is called the start page. You can configure multiple pages in IIS as the start page. In the window 1-10, we set multiple pages as the start page, during running, IIS will check whether there is a corresponding page for our website or virtual directory in the order from top to bottom. If a qualified webpage is found, it will stop searching. If it is a static webpage, the static webpage content is directly transmitted to the client. If it is a dynamic webpage, find the relevant script engine to execute the server code on the current page and transmit the final result to the client.

(4) "ASP. NET" tab: multiple versions of the. NET Framework can be installed on one machine without interference. If multiple versions are installed on one machine. NET Framework, you need to let Internet Information Service (IIS) Know Which ASP to use. net isapi (aspnet_isapi.dll) version processing ASP.. NET application.

If multiple instances are installed on the current machine. NET Framework version, you need to correctly set the ASP used by each website or virtual directory.. NET version.. NET Framework versions are consistent, as shown in figure 1-11.

(Click to view the larger image) Figure 1-10 "document" tab
Figure 1-11 select the ASP. NET version for the ASP. NET application to run

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.