A: The general principle of website operation:
1. All Web programs need one thing to run: Web Server Software.
2. The site is divided into dynamic pages and static pages
3. The role of Web server Software: receiving requests, responding to requests. Passive-no response is not requested.
Server Software--tomcat in the Java language
Server Software--apache in the PHP language
. NET Server Software Asp/aspx--iis (development, run)/iis Express (experience version, general development with this is enough)
Two: The difference between dynamic pages and static pages
Static. Html,.htm: When the page is found by IIS, it responds directly to the client.
Dynamic. Asp,.aspx,.php,.jsp:iis After the page is found, it is processed by the. NET Framework program and then responds to the client,. NET is commonly used by. aspx.
Three: About IIS
1. Where is IIS?
The server operating system comes with the default. Windows nt,window2000 server,windows2003 server,windows2012 Server
PC operating system is not with the default. windows95/windows98/windows2000 professional/windows me/windows xp/windows vista/windows7/windows8, but Windows Vista and above actually with IIS just not enabled
2. Install IIS:
Open Control Panel/control and features/turn on or turn off Windows features/Find Internet Information Service, tick all the options under the Web Management tool inside, and tick the static content under common HTTP functions under the World Wide Web service. Tick both ASP. NET and ASP under the application development function, then click OK and wait a few minutes for the installation to succeed.
3. Registering the. NET Framework version with IIS: Installed IIS because the. NET framework of the application pool in which it is installed is also the system's own framework, WIN7 is 2.0 and needs to register VS's. NET Framework version
Registration method: Locate VS2012 in the Start menu, expand folder to locate the Visual Studio Tools folder inside the expand, if the computer is 64-bit open VS2012 x64 compatible tool command prompt, 32-bit open VS2012 x86 compatible tool command prompt
In the Open Interface input: aspnet_regiis-i, enter register, wait for registration completed
4.. NET Framework version of the issue
. NET Framework Current version: 1.0/1.1/2.0/3.0/3.5/4.0/4.5
Version of VisualStudio: 2002/2003/2005/2008/2010/2012
VS2002 corresponds to the 1.0 version, 2003 corresponds to the 1.1 version, 2005 corresponds to 2.0 (also the expanded 3.0 version), 2008 corresponds to the 3.5 version, 2010 corresponds to the 4.0 version, 2012 corresponds to the 4.5 version
. NET Framework version of the existing three core mature version of 1.1, 2.0 and 4.0, the others are based on the expansion, so some programs read the version number is the core version number, and the actual version there are some deviations, here VS2012 is actually 4.5 framework, after registering with IIS, we see the program Pool version number is its core 4.0
5. IIS Configuration
(1) configuration of the home directory and selection of the application pool
Select the site in the left-hand directory, and then locate the edit site/basic settings in the right-hand directory, open the set physical path (that is, the path where the site resides), and choose the application pool.
(2) Permissions configuration
Select the Web site on the left side of the directory, and then find the edit permissions in the right directory (or right-click on the Directory folder), open the properties of the folder, locate the Security tab, click Edit
Then click Add, in the advanced inside Point find Now, find Iis_iusrs and IUSR These two click OK, add in
After the add is complete, select the just added, tick the full control below to make sure that the permissions are added
(3) Set default document
After selecting a Web site there will be a default document icon in the middle, double click to enter the default document Set
In the default document interface, there are some documents listed, the top one is the default (that is, the browser input IP after the default display of the page), the right can adjust its location, you can also add a new page in
6. How do I deploy multiple sites on a single server?
1. The first approach is to use a virtual directory, or application implementation, virtual directories are generally used for static web pages, applications for dynamic Web pages (also equivalent to virtual directories)
Method: Right click on a website name/add virtual directory or application
In the Popup interface, write an easy-to-identify alias, select the path to the site you want to add, here is the F:/test
Click OK, at this time we can see a haha site under the site, it appears in the directory of the site, in fact, are stored separately on different disks, just a virtual path in this show
When you are done, open the haha/bbb.aspx in the browser and open the Bbb.aspx website in Test F.
2. The second method is to create a new site.
The first step: new assigned IP;
First, add IP in Control Panel/network and Sharing Center/Change adapter settings/Find current network connection/right-click Properties/Find ip4/Double-click/Advanced IP Settings, one machine can add multiple IPs for access
Step Two: Create a new site.
Add IP, right-click Web site in IIS, fill in the site name, physical path, IP address assignment
Once you have identified a new website, you can access different sites on the server by entering a different IP in the browser.
3. The third method is to create a new port: the same IP, which is assigned to a different port.
In the IIS site right-click Add site, fill in the site name, physical path, IP address or with the same IP, but the back of the port to be remembered, this is changed to 8080, the default is 80
OK after a new site, IP is duplicated, but the port is not the same, in the browser input IP default is to go to the port is 80 that site, after the IP plus: 8080, will go to the new site, through the port to differentiate
Use vs to build Web sites and IIS