ASP. NET MVC-Publish Web applications, deploy to IIS

Source: Internet
Author: User

Publish Project

Right-click the project-Publish

Select IIS-click Publish

Publish method-file system, target location-Select a directory different from the one in which the project is located (that is, specify a directory to publish the generated files), file publishing options-click Publish

Installing IIS

Click on the Windows Logo-settings-apps and features-right side programs and features

Left-turn Windows features on or off

After checking Internet Information Services, IIS is automatically installed, so be sure to select the ISAPI under the World Wide Web service option, preferably all, abortions.

Locate the IIS Manager icon in the Programs list and open it.

Deploying Web Projects to IIS

Right-click Web site-Add site

Just specify: The name of the site, the root directory of the project you just published, the port

Double-click the application pool, in the middle panel, if the list is not the same as in the following diagram, IIS is not installed completely.

Now that the Web site has been deployed to IIS, you can test it by clicking the Web site icon on the left side of IIS Manager and clicking the Browse Web site on the right

Attaching the project being developed to IIS

You do not need to publish the project, add the site directly in IIS, and select the directory where the project is located. If you modify the source code in VS, you must compile the project before visiting the Web site through a browser, or the site will not execute the program that has been modified. When you need to debug your project, you can use attach to process, provided that the Web program in IIS is already running in w3wp.exe. Create breakpoints in vs with admin login-compile Project-click on menu bar's Debug menu-Attach to process-tick show all processes-double-click w3wp.exe. If W3wp.exe is not in the process list, you can start a request to IIS and open the Web page, where W3wp.exe appears in the list of processes that the VS attaches to the process.

Common errors:The user ' IIS apppool\xxx ' logon failed. Workaround: Double-click Application Pool-right-click in the middle of the panel to select the application pool where your Web program is located-Advanced settings-Process model-Select the appropriate mode for the login databaseif the options in the list are not valid, select Applicationpoolidentity, and then change the database connection string to user password login in Web. config, such as SA

If you double-click the error under "Handler mappings" times: Because the IIS7 incorporates the integrated piping mode, the module and the handler are locked

Handler Mappings
---------------------------
An error occurred while performing this operation.

Workaround:

Administrator Run command line unlock:
C:\windows\system32\inetsrv\appcmd unlock config-section:system.webserver/handlers
C:\windows\system32\inetsrv\appcmd unlock Config-section:system.webserver/modules

ASP. NET MVC-Publish Web applications, deploy to IIS

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.