First Part test Environment
operating System : Win7 Professional Edition
database version : Microsoft SQL Server R2
Part II IIS Configuration
1. Turn on IIS
Start → control Panel → programs → turn Windows features on or off → Click to select each item → OK (The foolproof method is to tick all).
2. Open and set up IIS
Start → control Panel → system and security → Administrative Tools →internet information Services (IIS) Manager
The configuration steps are as follows:
- Select "Name-pc" on the Left
- Select an ASP in IIS
- Modify "Enable parent path" to True
In addition, locate the Aspnet_regiis.exe in the "C:\Windows\Microsoft.NET\Framework\v2.0.50727" directory and double-click to run.
Finally, select "Application Pool" in the left-hand side, such as:
Press the "Classic. NET AppPool" on the right to set it by selecting "Set Application pool Defaults" after right-clicking on it.
Part III Open Database Service
The procedure is as follows:
- Log in to SQL Server 2008 by using Windows Authentication mode;
- Select "New Query" on the left;
- Copy the script "alter Login SA with password= ' pwd123 '" into it and run it;
- Re-login with SA user and enter it smoothly.
Note: SQL Server 2008 Services (SQL Server Browser and SQL Server) are turned on as.
Fourth Part Configure the site
The procedure is as follows:
Start → control Panel → system and security → Administrative Tools →internet information Services (IIS) Manager
- Right-click on the site on the left and select "Add Site"
- By setting each item
Places to be aware of:
Pass -through authentication: Click Connect as → specific user → settings (the computer's login name and password to guarantee access to the folder).
IP address : If it is a local area network, select the address in the drop-down box, and if it is native, use 127.0.0.1 or localhost.
ports : The default port number is 80 and can be set to a different value (two sites can use a port number).
hostname : It is best not to set before publishing (specifically unknown).
Fifth Part Connecting sites and Databases
The procedure is as follows:
- Attach the database (lmzz2013.mdf) you want to use in your Web site to SQL Server 2008
- Modify the Web. config file under the root directory of the website to modify the ConnectionString value to "Data source= server; Initial catalog= database; User Id=sa; password= password ". (Description: The password is pwd123, previously configured)
Sixth part Open Port
windows→ Advanced Security Windows Firewall → inbound rules → new rule → Port →tcp→ specific local port (8080) → allow connection → domain, private, public → name (webport) → OK
I wish you success!!!
Win7 Publishing Web site