iis7.0 Posted on mvc4.0 website

Source: Internet
Author: User

The steps are as follows:

1. Right-click the item you want to publish, and select "Publish ..." in the popup menu.

2. Set in the Publish Web dialog box, the profile name defaults to "Profile 1", which can be modified to the desired name for identification or not to change. Publish method Select File system, choose a folder at the target location to hold all files for the entire site that will be published, here I choose "d:\ My Documents \ Desktop \zpgweb" and then click the "Publish" button.

3. Click Post to generate the site files in the specified folder, publish successfully!

Next, deploy the successful site to iis7.0.

The steps are as follows:

1. Install the Microsoft. NET Framework 4.0 installation package (the. NET Framework4.0 framework is used during web development);

2. Install ASP. NET MVC 4.0;

3. Set the "ASP. v4.0.0.30319" in "ISAPI and CGI restrictions" for IIS to allow, as shown in:

4. Publish the website in iis7.0, set the site home directory to "d:\ My Documents \ Desktop \zpgweb":

5. Set the. NET Framework version of the site (site "specialsite") application pool to 4.0.30196:

To add an application pool:

Set the added application pool to the site Specialsite

6. This completes the deployment of the mvc4.0 site in iis7.0.

Next, in the browser input http://localhost view the MVC4.0 project you just deployed, such as:

If the content appears, it indicates that iis7.0 successfully ran the project created by mvc4.0!!

Follow-up NOTE:

1. If the reader is using IIS that is installed after the. NET Framework is installed, IIS registration is required, start-run--cmd, open a command-line prompt, and enter the command as follows

C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis.exe-i

Enter run, if the reader's server is a 64 system, then you need to use the command C:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet_regiis.exe-i to run the registered IIS.

2. Since mvc4.0 has created the project, the default route is automatically configured as the index method (ActionResult) under the HomeController controller in the file "RouteConfig.cs" in the App_start folder under the project. Therefore, you do not need to configure the default document name in the site default document, the site will automatically find the default need to display the view file according to the MVC routing mechanism. Such as:

Reprint: http://www.jb51.net/softjc/157357.html

iis7.0 Posted on mvc4.0 website

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.