First attempt to build a Web site and deploy to a local IIS server

Source: Internet
Author: User

Today is my first time contacting. NET, trying to simply make a page and deploy it locally.

This is a stupid tutorial, only for personal records, laughed at.

-------------------------------------------------------------

The tool used in this session:

1. Win7;

2. Visual Studio 2013;

3. NET Framework 4.0 (System comes with);

4. IIS (System comes with);

-------------------------------------------------------------

Steps:

I. Create an ASP. NET Web site in vs for simple content writing

1. Click on the file-"new-" website in vs.

2. Because this is in C #, select Visual C # on the left-hand template bar, and then select the ASP. NET site, or you can choose to create a new site template with content for the ASP. Click OK.

3. The newly created site has only the original configuration file, Web. config, and you need to create your own page and add content: Right-click the project in Solution Explorer, add--Add New item, select Web Form to create a new Web page.

4. As you can see in Solution Explorer, the newly created page is accompanied by a Default.aspx.cs file, which is a C # file for handling logic.

5. Open the Default.aspx file, edit the page layout, and the toolbox on the left side of the VS has already defined controls for use, such as Textbox,button.

6. Write the required logic in Default.aspx.cs.

7. Commissioning------Start Debugging to run Web page observation effect

Two. Publish the Web page to the local file system

1. Click on Generate--publish website.

2. No configuration file at this time, select the new profile in the dropdown, name, but note that the way to publish the file system needs to select, and then fill in the target location, this location is the site you want to publish to the destination folder.

3. Next, the configuration can choose debug for easy Debugging.

4. Next, publish.

5. Open the target folder you just posted, and you can see the content of the website you published yourself. Here, you will find that the C # files are missing when you create the site. Open the Bin directory, you will find that there is a dynamic link library file, yes you are not mistaken,. cs file is precompiled generated this DLL file.

6. The website has been published.

Three. Deploy the Web site to the local IIS server.

In this step may encounter some small problems, when encountered can be found on the Internet, about this part of the solution of various problems on the Internet is still a complete hhh.

Next I'll write my own steps.

1. Turn on the necessary Internet services. Control Panel--programs and features--turns Windows features on or off. The Internet Information Services hosted Web core, all subkeys of the Internet Information Service, all subkeys of the Microsoft. NET Framework 3.5.1 are then checked, determined, and turned on.

2. Open Internet Information Services (IIS) Manager.

3. Right-click the application pool and add the application pool. Select the. NET Framework version, because the destination. NET Framework for my published site is version 4.0, so here's the v4.0. A name can be used to remember the name of the. NET Framework version number for your own convenience. Pipe mode selection integration.

4. You can then add a Web site to your IIS server and launch it. Right-click on Web Site--add site. The website name is written by itself. Application pool Select the application pool that you just created. The physical path selects the root of the previously published Web site. The IP address uses the local address in the drop-down bar, and the port uses an unoccupied port. Are you sure.

5. If no error occurs, your site has been successfully deployed to the local IIS server and started. You can click on the Browse website on the right side of IIS Manager to see.

First attempt to build a Web site and deploy to a local IIS server

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.